In the AJAX Extensions tab of the toolbox, double-click the ScriptManager control to add it to the page.
Double-click the UpdatePanel control to add it to the page.
Click inside the UpdatePanel control and then in the Standard tab of the toolbox, double-click the Label and Button controls to add them to the UpdatePanel control.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Label1.Text = "Refreshed at " & _
DateTime.Now.ToString()
End Sub
Save your changes and press CTRL+F5 to view the page in a browser.
Click the button.
Notice that the text in the panel changes to display the last time the panel's content was refreshed. This text is set in the button's Click event handler.
To see the full example in action, click the Run It button. The example is styled to better show the region of the page that the UpdatePanel represents.
The panel content changes every time that you click the button, but the whole page is not refreshed. By default, the ChildrenAsTriggers property of an UpdatePanel control is true. When this property is set to true, controls inside the panel participate in partial-page updates when any control in the panel causes a postback.
댓글 영역