Yesup
 
 

Yamabay Knowledge Base

 

Ajax for ASP.NET 1.1 or even ASP

Previous Article Back to TOC Next Article

We know that Atlas, which we have just described in the previous topic, is Microsoft’s Ajax Framework for ASP.NET 2.0. But how about we want to use Ajax for the existing ASP.NET 1.0/1.1 Web applications, or even classic ASP Web applications.


Actually, Ajax is nothing fancier than using XMLHTTP ActiveX from within Javascript to get data from Web Server, without going through the HTML Form Submit, which will cause the refresh of the whole page. Any JavaScript developer who is familiar with HTML DOM (Document Object Model) and XMLHTTP can easily write Ajax from any environment, including ASP.NET 1.0/1.1 and even class ASP pages.


Click here to get an Autocomplete example from a page AjaxSample.htm. When user enters characters into the text box, the Javascript in this page will invoke XMLHTTP to ask Web Server to supply the suggested complete names. For example, if you type Alb, it will come back with Albert Einstein.


In short, AjaxSample.htm calls GetUsernames.aspx on Web server to get the suggested complete names, and then display the feedbacks on the Web page, without refreshing the page. The example can be easily expanded to many places in BizNet to supply something like e-mail address Autocomplete functions, or Parts Number Autocomplete functions, within the existing ASP.Net 1.1 framework.


To use this application, simply copy all files to a ASP.NET application folder, and copy the dll to the /bin folder. use web browser to launch the page http://localhost/someapp/AjaxSample.htm

Yesup
Top Stories Travel Movies Gift Ideas Free Software Games