Friday, 28 December 2012 15:54

Updatepanel control in asp dot net

Written by 
Rate this item
(0 votes)

The great control in the asp.net ajax is the update
panel control.it can be added to almost every
asp.net page almost magically.this control when
used with a ScriptManager permits a programmer to
use partial rendering(a technique by which many
sections of page updated partially without reloading
the entire page).

following is a simple example wrapping a GridView in an
UpdatePanel control -

<asp:ScriptManager runat="server" ID="ScriptManagers"
EnablePartialRendering="True" />

<h1>Gridview data:</h1>
<p>Page rendered at <%= DateTime.Now.ToLongTimeString() %>.</p>
<asp:UpdatePanel runat="server" ID="TheUpdatePanel">
<ContentTemplate>
<asp:GridView id="Grid" runat="server"
AllowPaging="True" PageSize="10"
onpageindexchanging="Grid_PageIndexChanging">
</asp:GridView>
<p>Grid rendered at <%= DateTime.Now.ToLongTimeString() %>
</p>
</ContentTemplate>
</asp:UpdatePanel>

in the above codes The UpdatePanel allows the content
within its <ContentTemplate> tags to be updated using Ajax
without reloading the page.

Read 2839 times
Super User

Email This email address is being protected from spambots. You need JavaScript enabled to view it.

Latest discussions

  • No posts to display.