Enable control after validator error

  • Thread starter Thread starter Peter
  • Start date Start date
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
 
do the disable in the onsubmit event, also use a window.setTimeout(), if you
need the server click to fire.


-- bruce (sqlwork.com)
 
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)
 
Back
Top