Friday, February 13, 2015

AJAX in ASP.NET

I did some searching on how to do AJAX with ASP.NET, and it actually took me a while to find useful information. It turns out that you don't actually have to know any JavaScript at all to get asynchronous web programming done in ASP.NET!

It's all done by using the UpdatePanel control. When a button inside one of those is clicked and if it modifies only the state of controls inside an UpdatePanel, the server will return only the contents of the panel, so there's no full postback/navigation/blink. It's so great and simple - the compiler takes care of all the JavaScript stuff. Controls can be added dynamically simply by doing a .Controls.Add(newCtl) on a Panel.

I am really looking forward to using this functionality to build great stuff with ASP.NET. Thanks Microsoft!

No comments:

Post a Comment