Default Page ASPX File :
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>ASP.Net code to use UpdatePanel control</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate> Number of refreshes:
<asp:TextBox ID="text" runat="server" ReadOnly="true" Text="0">
</asp:TextBox>
<asp:Button Text="Increment Counter" ID="btn" runat="server"
onclick="btn_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>