Usage of Update Panel..

Bharathi Cherukuri
Posted by Bharathi Cherukuri under ASP.NET AJAX category on | Points: 40 | Views : 1623
The <asp:UpdatePanel> tag consists of two childtags.
They are ContentTemplate and Triggers tags.
The ContentTemplate tag is required, since it holds the content of the panel. The content can be anything that you would normally put on your page, from literal text to web controls. The Triggers tag allows you to define certain triggers which will make the panel update it's content.


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns="">
<head runat="server">
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel runat="server" id="UpdatePanel" updatemode="Conditional">
<asp:AsyncPostBackTrigger controlid="UpdateButton2" eventname="Click" />
<asp:Label runat="server" id="DateTimeLabel1" />
<asp:Button runat="server" id="UpdateButton1" onclick="UpdateButton_Click" text="Update" />
<asp:UpdatePanel runat="server" id="UpdatePanel1" updatemode="Conditional">
<asp:Label runat="server" id="DateTimeLabel2" />
<asp:Button runat="server" id="UpdateButton2" onclick="UpdateButton_Click" text="Update" />

Comments or Responses

Login to post response