Home > Net >  Js to disable the linkbutton and change his words
Js to disable the linkbutton and change his words

Time:09-20

Using a LinkButton in ASP.NET, would like to use JS to control the disable and enable it, check the web along while, most of the way to no, now share the solution:
Linkbutton ID in parsing is not you to set the ID of the client, pay attention to in the browser check, I use the master page, ID into: ContentPlaceHolder1_LinkButton1

So, change the content that is: $(" # ContentPlaceHolder1_LinkButton1 "). The text (" closed registered ");
To disable him, got a lot of methods: online mostly in the link. The setAttribute (" disabled ", "disabled"); . The link href="javascript: void (0);"; Test has no effect,

Linkbutton is to use the postback, therefore, to add a client he have to do is click event,
$(" # ContentPlaceHolder1_LinkButton1 "). Click (function () {
return false; });

Return false, wouldn't perform server click event,
About one or two hours to solve this problem, share to you,

CodePudding user response:

$(' # txbCardCode). Attr (" disabled ", false);

CodePudding user response:

Why JQUERY can fix things must get back to deal with the waste of resources
  • Related