Social Icons

Wednesday, 22 May 2013

UpdatePanel Example: How to use asp.net ajax Updatepanel Control

How to use UpdatePanel Control in Asp.Net

Introduction:

In this tutorial i will explain how to use updatepanel control for partial page rendering on webpage in asp.net with example.

Description:

In my previous tutorial i explained asp.net validation controls Tutorails, Asp.Net Ajax Tutorial Overview,Now we will see the how updatepanel will perform partial page rendering on the page.

To use an updatepanel control:

  1. Create a new webpage and switch to design view.
  2. Add ScriptManager control from the ajax extensions tab of toolbox to page.
  3. Then add a updatepanel control  then take a label and button in inside updatepanel.
  4. In button click event update the current time in label.

Ajax updatepanel example:


In button Click event write code like this
 
Now run the page by ctrl+F5 then you will notice that whenever you submit the page(clicking the update button) the label is updated with present time but the whole page is not submitted. Thus update panel will perform Partial page rendering.

Related Tutorials

 

No comments:

Post a comment

Please Give your Valuable Suggestions,Questions and Comments to improve my blog.