日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
ASP.NET AJAX中ScriptManager控件

在ASP.NET AJAX中,由于一個ASPX頁面上只能有一個ScriptManager控件,所以在有Master-Page的情況下,如果需要在Master-Page和Content-Page中需要引入不同的腳本時,就需要在Content-page中使用ScriptManagerProxy控件,而不是ScriptManager,ScriptManagerProxy和 ScriptManager是兩個非常相似的控件。ASP.NET AJAX簡單定義形式如下:

 
 
 
  1. <asp:ScriptManagerProxyidasp:ScriptManagerProxyid="ScriptManagerProxy1"runat="server"> 
  2.  
  3. <asp:ServiceReferencePathasp:ServiceReferencePath="CalculWebService.asmx"/> 
  4.  
  5.  

在它下面可以添加的子標簽有:Services,Scripts,AuthenticationService,ProfileService

添加一個Master-Page,在它上面添加一個ScriptManager控件,并引入WebService SimpleWebService.asmx,并添加相應(yīng)的HTML元素:

 
 
 
  1.  
  2. <asp:ScriptManagerIDasp:ScriptManagerID="ScriptManager1"runat="server"> 
  3.  
  4. <asp:ServiceReferencePathasp:ServiceReferencePath=
    "SimpleWebService.asmx"/> 
  5.  
  6.  
  7. <asp:contentplaceholderidasp:contentplaceholderid=
    "ContentPlaceHolder1"runat="server"> 
  8.  
  9.  

    請輸入名稱:

     
  10. <inputidinputid="inputName"type="text"/> 
  11. <inputidinputid="button"type="button"value="確定"onclick=
    "returnOnbuttonGo_click()"/> 
 

添加一個Content-Page,在它上面添加一個ScriptManagerProxy控件,并引入WebService CalculWebService.asmx,并添加相應(yīng)的HTML元素:

 
 
 
  1.  
  2. <asp:ScriptManagerProxyidasp:ScriptManagerProxyid=
    "ScriptManagerProxy1"runat="server"> 
  3.  
  4. <asp:ServiceReferencePathasp:ServiceReferencePath=
    "CalculWebService.asmx"/> 
  5.  
  6.  
  7. 請輸入兩個數(shù):

     <inputidinputid="inputA"type=
    "text"style="width:110px"/> +   
  8. <inputidinputid="inputB"style="width:110px"type="text"/>   
  9. <inputidinputid="buttonEqual"type="button"value="="onclick=
    "returnOnbuttonEqual_click()"/> 
 

關(guān)于ASP.NET AJAX中ScriptManagerProxy控件就介紹到這兒,有個問題就是在我的IDE中為什么ScriptManagerProxy總是提示為未知元素,但運行起來并不抱錯,結(jié)果也可以出來?

【編輯推薦】

  1. 介紹ASP.NET MVC框架
  2. 淺談ASP.NET MVC的MvcContrib.FluentHtml
  3. ASP.NET框架的功能與ASP.NET MVC模式的應(yīng)用介紹
  4. 淺析Asp.net MVC生命周期
  5. 配置ASP.NET AJAX概述

網(wǎng)站欄目:ASP.NET AJAX中ScriptManager控件
轉(zhuǎn)載來源:http://www.5511xx.com/article/djoijhh.html