How to disable Asp.net Button with JQuery?

Following java script function disables an asp.net button. Tested in IE 7

<asp:Button ID=”Button1″ runat=”server”  Text=”Disable me” OnClientClick=”disAbleMe()” />

function disAbleMe() {
$(“#<%=Button1.ClientID %>”).attr(“disabled”,”true”);

}

You can try other attributes too.

I Wan to share this post:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • kick.ie
  • Live
  • MyShare
  • IndianPad
  • Reddit
  • StumbleUpon
  • Technorati
  • YahooMyWeb
  • DotNetKicks
  • DZone
  • TwitThis