In ASP. net ajax, because An ASPX Page can only have one ScriptManager control, in the case of Master-Page, if you need to introduce different scripts in Master-Page and Content-Page, you need to use the ScriptManagerProxy control in Content-page instead of ScriptManager, scriptManagerProxy and ScriptManager are two very similar controls. Simple definitions of ASP. net ajax are as follows:
- <asp:ScriptManagerProxyidasp:ScriptManagerProxyid="ScriptManagerProxy1"runat="server">
- <Services>
- <asp:ServiceReferencePathasp:ServiceReferencePath="CalculWebService.asmx"/>
- </Services>
- </asp:ScriptManagerProxy>
The following sub-tags can be added: Services, Scripts, AuthenticationService, ProfileService
Add a Master-Page, add a ScriptManager control on it, introduce WebService SimpleWebService. asmx, and add corresponding HTML elements:
- <Div>
- <Asp: ScriptManagerIDAsp: ScriptManagerID= "ScriptManager1"Runat= "Server">
- <Services>
- <Asp: ServiceReferencePathAsp: ServiceReferencePath=
"SimpleWebService. asmx"/>
- </Services>
- </Asp: ScriptManager>
- <Asp: contentplaceholderidAsp: contentplaceholderid=
"ContentPlaceHolder1"Runat= "Server">
- </Asp: contentplaceholder>
- & Nbsp;<H3>Enter the name:</H3>
- <InputidInputid= "InputName"Type= "Text"/>
- <InputidInputid= "Button"Type= "Button"Value= "OK"Onclick=
"ReturnOnbuttonGo_click ()"/>
- </Div>
Add a Content-Page, add a ScriptManagerProxy control on it, introduce WebService CalculWebService. asmx, and add corresponding HTML elements:
- <Div>
- <Asp: ScriptManagerProxyidAsp: ScriptManagerProxyid=
"ScriptManagerProxy1"Runat= "Server">
- <Services>
- <Asp: ServiceReferencePathAsp: ServiceReferencePath=
"CalculWebService. asmx"/>
- </Services>
- </Asp: ScriptManagerProxy>
- <H3>Enter two numbers:</H3>& Nbsp;<InputidInputid= "InputA"Type=
"Text"Style="Width: 110px"/>& Nbsp; + & nbsp;
- <InputidInputid= "InputB"Style= "Width: 110px"Type="Text"/>& Nbsp;
- <InputidInputid= "ButtonEqual"Type= "Button"Value= "="Onclick=
"ReturnOnbuttonEqual_click ()"/>
- </Div>
About ASP. in net ajax, The ScriptManagerProxy control is introduced here. The question is, in my IDE, why does ScriptManagerProxy always prompt that it is an unknown element, but it does not run correctly and the result can also be displayed?
- Introduction to ASP. net mvc Framework
- MvcContrib. FluentHtml of ASP. NET MVC
- Functions of ASP. NET Framework and Application of ASP. net mvc pattern
- Analysis of Asp.net MVC Lifecycle
- Overview of ASP. net ajax Configuration