normally in asp.net when you clicks on a button or post the page entire page get posted on the server and return back to the client browser.
To avoid this you can use
AJAX
put the button or control inside the
UPDATEPANEL Which make page post.
and put the part of the page in
UPDATEPANEL which will get changed.
By Using this instead of Entire Page post only required part of the page will get changed.3
eg..
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:updatepanel id="UpdatePanel1" runat="server" xmlns:asp="#unknown">
<contenttemplate>
<asp:label id="Label1" runat="server" text="Label">
<asp:button id="Button1" runat="server" text="Upload" onclick="btnUpload_Click" />
Button1_click()
{
Label1.Text = DateTime.Now.ToString();
}