I want to disable a LinkButton clink on the client site.
objLinkButton.disabled = true;
// or
objLinkButton.disabled = -1;
Th
I am building on tvanfosson 's answer. His answer using jQuery works well, but if you have validators it messes things up. Here goes:
var code = null;
$(document).ready(function () {
var button = $('#SubmitPaymentLnkBtn');
code = button.attr('href').replace(/javascript:/, '');
button.attr('href', '#'); // replace postback function
button.click(function () {
if (Page_ClientValidate('PaymentInfo')) {
// now only runs if above validationGroup is valid
$(this).unbind('click');
if (code) {
$(this).addClass('disabled-btn');
eval(code); // do post back
}
}
});
});
Then in your markup, be sure to set ClientIDMode to Static.