Doing AJAX with popular javascript libraries

| Basic | Prototype.js | Dojo Toolkit | Yahoo UI Library | ASP.NET | Rails |

ASP.NET

Strictly speaking it's an server side development framework, but it does include descent amount of javascript API. If you are familiar with ASP.NET you will know what I am talking about. For those who are new, ASP.NET does add quite a bit of javascript to the pages it serves (for causing postbacks, client side validations etc.). In ASP.NET 2.0 there more javascript goodies. Now, the model followed in ASP.NET is quite structured, its not mandatory to follow that, but highly recommended, as it takes care of many things for you. AJAX can be made possible by defining 'WebMethods' in serverside code of an *.aspx page:
[WebMethod]
   public string GetHelloString(string name) 
   {
       return 'Hello '+name;
   }
Without any effort on your part (and some magic by the 'ScriptManager' object) the framework adds required javascript code to the web page. In the webpage you can make an AJAX call like this:
<script language="JavaScript" type="text/javascript">

function GetMoreInfo() 
{
    PageMethods.RetrieveMoreInfo(
            'Geek',       
            OnComplete, 
            null);
    return false;
}
</script>
  • ASP.NET 2.0 has some awesome AJAX functionality. One of which is the 'UpdatePanel'.
  • ASP.NET 2.0's 'Control Toolkit' also has amazing AJAX features and widgets.
| Basic | Prototype.js | Dojo Toolkit | Yahoo UI Library | ASP.NET | Rails |


Copyright (c) 2007-2017 Ashish Patil . Please read FAQ for more details.

comments powered by Disqus