According to user feedback this week, ASP. NET Ajax (Atlas), from CTP to Beta 1, cannot be said to be "progress" or "regressing ". As a new version with such great changes, ASP. NET Ajax seems to be somewhat unstable. This article will list some developers Community And the corresponding solutions, and will be updated constantly, I hope to help you.
The following are two blogs (http://blogs.msdn.com/sburke/) from Shawn Burke, the director of Microsoft ).
[Method error 12031] or [method Error 500] exception occurred when calling the web method from the client.
To call the web method in a web service on a server from a client, the Web service must have Microsoft. Web. Script. Services. scriptserviceattribute Attribute: [Microsoft. Web. Script. Services. scriptservice ()]
Public Class Myservice: system. Web. Services. WebService {
//
}
to call a definition from the client and the PAGE method in the page, the page method must be Microsoft. web. script. services. scriptmethodattribute Attribute Modification (of course, system. web. services. webmethod is also essential), and must be a static (static) method . A bug in the current version also results in the need to define this web method in the aspx file . definition in the CS file is useless (helpless ): script runat =" server " >
[system. web. services. webmethod]
[Microsoft. web. script. services. scriptmethod]
Public static string gethtml (string contextkey) {
//
}< br> script >
Extender control (including Ajax Control Toolkit) cannot work properly in template controls (such as login) or data-bound controls (such as gridview ).
The reason is that all client scripts in Beta 1 are managed by scriptmanager, while scriptmanager traverses the controls on the page during the prerender period and outputs the necessary client scripts, however, the content in the template is usually generated during the prerender, so that the two missed the opportunity to communicate, the client scripts required by the extender control in the natural template will not be sent to the browser, in the end, extender control cannot be used in the template control.
The solution is to force the page to generate a template control or data binding control content in the load event before the prerender, so that the scriptmanager can find them correctly during the prerender: Protected Void Page_load ( Object Sender, eventargs E)
{
Gridview1.databind ();//The data binding control uses this
ObjectO=Login1.controls;//The template control uses this
}