Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Using UpdatePanel

This is the simplest way of injecting Ajax in a web part. Place all the content of the web part inside an UpdatePanel. First, to make the page AjaxWebPartPage1.aspx Ajax-enabled, drop the ScriptManager control onto the page. This control takes care of all the asynchronous operations. Then, in the RightZone web part zone, drop an UpdatePanel control from the AJAXExtensions toolbox and place the MyControl user control inside the ContentTemplate tag of the UpdatePanel. As discussed in Hour 8, “Working with the UpdatePanel and UpdateProgress Controls,” the UpdatePanel control is used for partial-page rendering, where only the portion of the page under the UpdatePanel is posted and rendered back.

The following is the HTML source of the WebPartZone RightZone after adding MyControl user control in an UpdatePanel:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial