Form Problems

L

Leon Shaw

I built a normal registration form containing the normal textboxes,
dropdownlists, and validation controls. However, when a user submits the
form in which some field does not pass the client side validation of a
particular control (textbox, dropdownlist, etc.) the cursor does not return
to that particular control. It returns back within in the page in which the
user can then delete the control.
What can I do to fix a problem like this? All I did was place some controls
inside of a table and added a submit button. Thanks!
 
K

Ken Cox [Microsoft MVP]

You might want to check whether Andy Smith's FirstFocus control will do what
you need. Once you determine which textbox was invalid you could probably call
FirstFocus.ControlToFocus and set the focus to it:

FirstFocus Example

http://www.metabuilders.com/Tools/FirstFocus.aspx

ASP.NET Validation Controls
http://www.dnzone.com/ShowDetail.asp?NewsId=125

I built a normal registration form containing the normal textboxes,
dropdownlists, and validation controls. However, when a user submits the
form in which some field does not pass the client side validation of a
particular control (textbox, dropdownlist, etc.) the cursor does not return
to that particular control. It returns back within in the page in which the
user can then delete the control.
What can I do to fix a problem like this? All I did was place some controls
inside of a table and added a submit button. Thanks!
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top