Form Problems

  • Thread starter Thread starter Leon Shaw
  • Start date Start date
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!
 
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!
 
Back
Top