Enable control after validator error

P

Peter

I have a button on webpage which gets disabled after user clicks on this
button, but the problem is I also have validators on the page, so when
there's an error and the validator displays the error the button is already
disabled and user can not click on it again. How do I re-enable the button
after the validator displays a message or how do I disable this button only
after the validator passes the test.

<asp:Button ID="butReport" runat="server" Text="Create Report" Width="119px"

onclick="butReport_Click"

onclientclick="this.disabled=true; this.value = 'Please wait...';"

UseSubmitBehavior="False" />

Thank You


Peter
 
B

bruce barker

do the disable in the onsubmit event, also use a window.setTimeout(), if you
need the server click to fire.


-- bruce (sqlwork.com)
 
P

Peter

Thank you

That works!!!


bruce barker said:
do the disable in the onsubmit event, also use a window.setTimeout(), if
you
need the server click to fire.


-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top