Today, the updatepanel control in aspx.net Ajax of MS is used to refresh some pages. however, when debugging the program, the error message "sys" is not defined. google in Baidu, the original needs to be in the web. add a configuration in the config page. the Code is as follows:
<Location Path = "scriptresource. axd">
<System. Web>
<Httphandlers>
<Remove verb = "*" Path = "*. asmx"/>
<Add verb = "*" Path = "*. asmx "Validate =" false "type =" Microsoft. web. script. services. scripthandlerfactory, Microsoft. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/>
<Add verb = "*" Path = "* _ appservice. axd "Validate =" false "type =" system. web. script. services. scripthandlerfactory, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/>
<Add verb = "Get, head" Path = "scriptresource. axd "type =" system. web. handlers. scriptresourcehandler, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "Validate =" false "/>
</Httphandlers>
</System. Web>
</Location>
After the increase, the error is eliminated. Haha!
By the way, you can add additional knowledge and extend it to the WebService method.
Solution to undefined WebService method:
Add the following code to Web. config:
<Httphandlers>
<Remove verb = "*" Path = "*. asmx"/>
<Add verb = "*" Path = "*. asmx" Validate = "false" type = "system. Web. Script. Services. scripthandlerfactory"/>
<Add verb = "Get, head" Path = "scriptresource. axd "type =" system. web. handlers. scriptresourcehandler, system. web. extensions, version = 1.0.61025.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "Validate =" false "/>
</Httphandlers>