Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 17th, 2004, 09:14 PM
Authorized User
 
Join Date: Jan 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASPX FORMS HELP

How can I disable the submit button after it is clicked, Then enable it back once processing is completed?

Thanks!

 
Old January 18th, 2004, 12:35 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Add an "onSubmit" event handler on your aspx form tag to set the disabled state.
The form tag would then look something like this:

<form id="Form1" method="post" onsubmit="this.cmdSubmit.disabled=true;" runat="server">

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old January 18th, 2004, 01:22 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

once I tried it, but when the button was disabled the form wasnt submited!? do u have the same problem or its ok with this way...

Always:),
Hovik Melkomian.
 
Old January 18th, 2004, 12:03 PM
Authorized User
 
Join Date: Jan 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Tried that before, but form wasn't submitted. I need to disable it after it is submitted to prevent one from submitting more than once.

 
Old January 18th, 2004, 02:58 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I did this to test it before I posted. I didn't have a problem with it.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
New.aspx works but login.aspx fails Validation nigelhamilton BOOK: ASP.NET Website Programming Problem-Design-Solution 8 September 13th, 2004 02:29 AM
New.aspx works but not Login.aspx ? reidcor BOOK: ASP.NET Website Programming Problem-Design-Solution 2 May 24th, 2004 10:32 AM
HowTo Pass Form data from Page1.aspx to Page2.aspx dati ASP.NET 1.0 and 1.1 Basics 6 January 27th, 2004 06:57 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.