Results 1 to 3 of 3

Thread: Best way to notify of a required field???

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Best way to notify of a required field???

    I need some help.

    I want to have some validation in my form, so that when a user submits the form it will alert them if they miss a required field.

    I am aware of the RequiredFieldValidator, but that takes up space on my form, and pushes it all around making it look terrible.

    I want to know what would be a better way of handling it but not too sure if any of these ideas will work, or how to implement properly.

    Could i have code in the code-behind of the submit button that verifies each field and then have a Javascript alert box popup to tell them they have a missing field and then cancel the submit. If so how do I call the javascript from the code-behind.

    Or should I just capture all missing fields, building a string which after if there are any errors, take them to another form displaying what errors were encountered on their submission, and get them to hit the 'back' button to go back to the form to correct their problems.

    Thanks.

  2. #2
    Member EricDalnas's Avatar
    Join Date
    Sep 2004
    Location
    Rhode Island
    Posts
    51

    Re: Best way to notify of a required field???

    all I usually do is use the required field validator but make it only large enough for an asterisk next to the field. And then I put a validation summary control at the top of the form.
    Maybe if you'd stop breathing and die for a change I wouldn't be so pissed off all the time.

    www.mredkj.com

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2004
    Posts
    149

    Re: Best way to notify of a required field???

    Could you tell me how you made the validation smaller, because for me the error message seems to determine the size of the requiredFieldValidation control.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width