TipsOnLips.net

Your .net tips and tricks source

About the author

Author Name is someone.
E-mail me Send mail

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010


ASP.NET Disable Submit Button on Click - C#

protected override void OnInit(EventArgs e)
{
    btnSearch.Attributes.Add("onclick", "javascript:" + btnSearch.ClientID + ".disabled=true;" 
			+ this.Page.GetPostBackEventReference(btnSearch));
    base.OnInit(e);
}

or

Disable ASP Button on Submit and capture the PostBack OnClick Event


Categories: ASP.NET | C#
Posted by Admin on Sunday, March 15, 2009 3:21 AM
Permalink | Comments (0) | Post RSSRSS comment feed
Comments are closed