Hi everybody,
One of the social website giving this feature i notice this stuff from their i feel pretty nice i done only on page load just like gmail.I done this by calling a javascript on server side on page load event i'm giving event name, no of second,button name, Display message :)
Important
"Match Every event with color"
lets move to coding
protected void Page_Load(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(3000); but_sve.Attributes.Add("onclick", ClientScript.GetPostBackEventReference(but_sve, "") + ";this.value='Please wait...';this.disabled = true;");
}
{
System.Threading.Thread.Sleep(3000); but_sve.Attributes.Add("onclick", ClientScript.GetPostBackEventReference(but_sve, "") + ";this.value='Please wait...';this.disabled = true;");
}
protected void but_sve_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(5000); ClientScript.RegisterClientScriptBlock(this.GetType(), "reset", "document.getElementById('" + but_sve.ClientID + "').disabled=false;", true);
lbl.ForeColor = System.Drawing.Color.Green;
//lbl.Text = "Data Have Saved";
Response.Redirect("http://www.google.com");// from here ur coding can start
}
{
System.Threading.Thread.Sleep(5000); ClientScript.RegisterClientScriptBlock(this.GetType(), "reset", "document.getElementById('" + but_sve.ClientID + "').disabled=false;", true);
lbl.ForeColor = System.Drawing.Color.Green;
//lbl.Text = "Data Have Saved";
Response.Redirect("http://www.google.com");// from here ur coding can start
}
U can download a demo from Here
No comments:
Post a Comment