Slave Http://ajax.net/ Download a compressed package. Txt Of Quick Usage Guide And one Doc Of Ajax. Net wrapper Usage Guide And DLL .
Well, look.TxtFirst. Learn aboutAjaxSteps for development:
1. Create a reference in the projectAjax. dllReference.
Ii. ModificationWeb. configFile, add
<Httphandlers>
<Add Verb= "Post, get" Path=" Ajax/*. ashx" Type= "Ajax. pagehandlerfactory, Ajax" />
</Httphandlers>
3.Page_loadAdd the following to the event:Code:
Ajax. Utility. registertypeforajax (Typeof(Webform1 ));
Here, the page can be usedAjax.
You can write a function in the background code and call it on the client. For example:
[Ajax. ajaxmethod ()]
Public IntServersideadd (IntFirstnumber,IntSecondnumber)
{
ReturnFirstnumber + secondnumber;
}
Here[Ajax. ajaxmethod ()]This sentence must be added. Otherwise, there is no way to use it on the client.
In this way, you can directly use thisServersideaddMethod. For example:
Function Add2 ()
{
VaR Re = webform1.serversideadd (form1.first. Value, form1.second. value)
Form1.result. value = Re. value;
}
You can see inJS, This server method was followed byWebform1This is the class name corresponding to the page.
Txt The example in this document is just for your preliminary understanding. Ajax Of course, there are more powerful functions. As a method used by the client, the return value can not only be common, such Int , String This type can also return Dataset And Class Such a complex type is also the "strong" of the Client Javascript "Provides the possibility that developers can perform" Object-Oriented "development on the interface.
at the same time, Ajax refresh is also one of its highlights. Famous component componentart New 3 . 0 product, call-back components. If you are interested, try them.
from: http://www.shpan.com/Detail.asp? Id = 378