這期內容當中小編將會給大家?guī)碛嘘PASP.NET中ScriptManager控件如何使用,文章內容豐富且以專業(yè)的角度為大家分析和敘述,閱讀完這篇文章希望大家可以有所收獲。
創(chuàng)新互聯是一家集網站建設,賈汪企業(yè)網站建設,賈汪品牌網站建設,網站定制,賈汪網站建設報價,網絡營銷,網絡優(yōu)化,賈汪網站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強企業(yè)競爭力。可充分滿足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯網需求。同時我們時刻保持專業(yè)、時尚、前沿,時刻以成就客戶成長自我,堅持不斷學習、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實用型網站。
在ASP.NET AJAX中,由于一個ASPX頁面上只能有一個ScriptManager控件,所以在有Master-Page的情況下,如果需要在Master-Page和Content-Page中需要引入不同的腳本時,就需要在Content-page中使用ScriptManagerProxy控件,而不是ScriptManager,ScriptManagerProxy和 ScriptManager是兩個非常相似的控件。ASP.NET AJAX簡單定義形式如下:
<asp:ScriptManagerProxyidasp:ScriptManagerProxyid="ScriptManagerProxy1"runat="server"> <Services> <asp:ServiceReferencePathasp:ServiceReferencePath="CalculWebService.asmx"/> </Services> </asp:ScriptManagerProxy>
在它下面可以添加的子標簽有:Services,Scripts,AuthenticationService,ProfileService
添加一個Master-Page,在它上面添加一個ScriptManager控件,并引入WebService SimpleWebService.asmx,并添加相應的HTML元素:
<div>
<asp:ScriptManagerIDasp:ScriptManagerID="ScriptManager1"runat="server">
<Services>
<asp:ServiceReferencePathasp:ServiceReferencePath=
"SimpleWebService.asmx"/></Services>
</asp:ScriptManager>
<asp:contentplaceholderidasp:contentplaceholderid=
"ContentPlaceHolder1"runat="server"></asp:contentplaceholder>
<h4>請輸入名稱:</h4>
<inputidinputid="inputName"type="text"/>
<inputidinputid="button"type="button"value="確定"onclick=
"returnOnbuttonGo_click()"/></div>
添加一個Content-Page,在它上面添加一個ScriptManagerProxy控件,并引入WebService CalculWebService.asmx,并添加相應的HTML元素:
<div>
<asp:ScriptManagerProxyidasp:ScriptManagerProxyid=
"ScriptManagerProxy1"runat="server"><Services>
<asp:ServiceReferencePathasp:ServiceReferencePath=
"CalculWebService.asmx"/></Services>
</asp:ScriptManagerProxy>
<h4>請輸入兩個數:</h4> <inputidinputid="inputA"type=
"text"style="width:110px"/> + <inputidinputid="inputB"style="width:110px"type="text"/>
<inputidinputid="buttonEqual"type="button"value="="onclick=
"returnOnbuttonEqual_click()"/></div>
上述就是小編為大家分享的ASP.NET中ScriptManager控件如何使用了,如果剛好有類似的疑惑,不妨參照上述分析進行理解。如果想知道更多相關知識,歡迎關注創(chuàng)新互聯行業(yè)資訊頻道。
本文題目:ASP.NET中ScriptManager控件如何使用
本文地址:http://www.chinadenli.net/article10/jsgcdo.html
成都網站建設公司_創(chuàng)新互聯,為您提供網站收錄、全網營銷推廣、網站改版、網站設計公司、微信公眾號、網站內鏈
聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯