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