How to add Please Wait message on a Button in asp.net c#
In this article, I will show you that how to add
please wait message on button in asp.net C#, we can get this to use GetPostBackEventReference
() this method.
Design:-
Source Code
<form id="form1" runat="server">
<div>
<asp:button ID="btnmsg" runat="server" text="Submit" Width="209px" />
</div>
</form>
Code behind:-
protected void Page_Load(object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(5000);
btnmsg.Attributes.Add("onclick",
ClientScript.GetPostBackEventReference(btnmsg, "")
+ ";this.value='Please wait....';this.disabled
= true;");
}
Out-Put:-
How to add Please Wait message on a Button in asp.net c#
Reviewed by NEERAJ SRIVASTAVA
on
12:27:00 PM
Rating:
No comments: