Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Enable control after validator error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter - 05 Mar 2008 16:59 GMT
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
bruce barker - 05 Mar 2008 17:32 GMT
do the disable in the onsubmit event, also use a window.setTimeout(), if you
need the server click to fire.

-- bruce (sqlwork.com)

> 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
[quoted text clipped - 14 lines]
>
> Peter
Peter - 05 Mar 2008 19:28 GMT
Thank you

That works!!!

> do the disable in the onsubmit event, also use a window.setTimeout(), if
> you
[quoted text clipped - 24 lines]
>>
>> Peter

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.