If you want to use update panel in your asp application then try this.........
First Step :
In your drag script manager in your asp master page write this code in your aspx page
<div>
<asp:UpdatePanel ID="testupdatepanel" runat="server">
<ContentTemplate>
<asp:Label ID="lbltime" runat="server"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID ="btnUpdate" EventName="Click" />
</Triggers>
</UpdatePanel>
</div>
<div>
<asp:Button ID="btnUpdate" runat="server" Text="Update" onclick="btnUpdate_Click" />
</div>
Second Step:
Write this code in your cs file:
protected void btnUpdate_Click(object sender, EventArgs e)
{
lbltime.Text = System.DateTime.Now.ToString();
}
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.
krishna kumar dubeyPosted May 2, 2011, 3:07 AM
nice
Prabhakar PariharPosted May 2, 2011, 2:44 AM
Gud one Prafull