Disable a button a web form.
-
Hi All, My senario is: once a user clicks a button on web form, say Save, how can i disable this button to prevent user click it again. Because this is a web form, so this one: btnSave.Enable = false wasn't working unitl the web fom refreshs, but i just want this button to be disable as soon as the user clicks it. could someone in here guide me or point me to the right direction as i am struggling to get this work long time already. Thanks heaps.
-
Hi All, My senario is: once a user clicks a button on web form, say Save, how can i disable this button to prevent user click it again. Because this is a web form, so this one: btnSave.Enable = false wasn't working unitl the web fom refreshs, but i just want this button to be disable as soon as the user clicks it. could someone in here guide me or point me to the right direction as i am struggling to get this work long time already. Thanks heaps.
use javascript to disable the button. www.anothercodesite.com/blog
-
Hi All, My senario is: once a user clicks a button on web form, say Save, how can i disable this button to prevent user click it again. Because this is a web form, so this one: btnSave.Enable = false wasn't working unitl the web fom refreshs, but i just want this button to be disable as soon as the user clicks it. could someone in here guide me or point me to the right direction as i am struggling to get this work long time already. Thanks heaps.
Hi, In the button click event you can write the btnsave.enable=false as a first line ,or else you can do it by using the javascript also ....
S Kumar
-
Hi All, My senario is: once a user clicks a button on web form, say Save, how can i disable this button to prevent user click it again. Because this is a web form, so this one: btnSave.Enable = false wasn't working unitl the web fom refreshs, but i just want this button to be disable as soon as the user clicks it. could someone in here guide me or point me to the right direction as i am struggling to get this work long time already. Thanks heaps.
Hi, Are you using UpdatePanel? Thanks, Rajdev KR
-
Hi, Are you using UpdatePanel? Thanks, Rajdev KR
-
Hi, In the button click event you can write the btnsave.enable=false as a first line ,or else you can do it by using the javascript also ....
S Kumar
-
Hi All, My senario is: once a user clicks a button on web form, say Save, how can i disable this button to prevent user click it again. Because this is a web form, so this one: btnSave.Enable = false wasn't working unitl the web fom refreshs, but i just want this button to be disable as soon as the user clicks it. could someone in here guide me or point me to the right direction as i am struggling to get this work long time already. Thanks heaps.
I have done pretty much the same thing. I ended up using a little jscript. I call it with the "true" or "false" that I want the item to have.
function applyvalidate(myenableflag) {
document.all.validate.disabled = true;
if (myenableflag == true) {
document.all.validate.disabled = false;
}
if (myenableflag == false) {
document.all.validate.enabled = false;
}
}The name of the button is "validate". I do this so that the person has to have a valid form (actively check with jscript) and when it is valid, the validate button lights up. they can then hit the validate button that provides a code for entry into a checklist. Then I light up the submit button. At anytime when the formcheck becomes invalid, i use the same functions to disable the buttons on the fly. Does that help?
-
I have done pretty much the same thing. I ended up using a little jscript. I call it with the "true" or "false" that I want the item to have.
function applyvalidate(myenableflag) {
document.all.validate.disabled = true;
if (myenableflag == true) {
document.all.validate.disabled = false;
}
if (myenableflag == false) {
document.all.validate.enabled = false;
}
}The name of the button is "validate". I do this so that the person has to have a valid form (actively check with jscript) and when it is valid, the validate button lights up. they can then hit the validate button that provides a code for entry into a checklist. Then I light up the submit button. At anytime when the formcheck becomes invalid, i use the same functions to disable the buttons on the fly. Does that help?