Friday, June 19, 2009

Beginning Ajax and ASP.NET 3.5

More articles in ASP.NET

Ajax is a great helper to us while developing rapid applications without worrying us at power of asynchronous. In Visyal Web Developer 2008 comes with builtin Atlas and ASP.NET3.5 . In this tutorial, I try to show you what's ajax and database querying at same time.

Now let's build our scene. Open an empty web site and dop a ScriptManager and UpdatePanel from Ajax Extensions tab. Close the tab and open standard controls and drop one textbox and one button. Place a label inside ajax control and one more outside of UpDatePanel. The second label will display that we are using Ajax and page is not posting back. I will add some hard codes and I have put s SqlDataSource and a GridView. Complete code is below.

Ajax Atlas ASP.NET 35

What's going on!

I'm sure that, you're thinking that that was too easy. We have just write a scene for Visual Web Developer and place all actors on board. When we start application, first label (outside of Ajax Control) will display the second of request time. Type a character on textbox and hit the burtton. Ajax will fill the GridView without posting page and label2 will display working second of application. Look at that label1 did not change. Because page loaded only one time but Ajax loaded data intop GridView without posting request. Only a small part of page has been updated.

Here is the page code:

See full detail:

No comments: