Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RequiredFieldValidator Control 1

Status
Not open for further replies.

VBRookie

Programmer
May 29, 2001
331
US
Is there a way to use the RequiredFieldValidator control yet have the errormessage display in an alert box? Currently it just shows up as text next to the control. On our app's login page I want to check if the user has entered a login ID and password and if not to pop up an alert box instead of just displaying text.

I looked at the customValidation control but my understanding of that is that it doesn't fire unless there is data in the control. So I couldn't use it to check if there is data. Correct?

Please advise.
Thanks,
- VBRookie
 
What you want to use is a ValidationSummary control.

Just stick one of those on your page, and set the
ShowMessageBox = True
ShowSummary = False

That way, when an error is encountered on a submit, an alert will display with the error text

D'Arcy
 
I remember seeing something about the validationSummary control in a book somewhere. I'll see if this will work for me.

Many Thanks,
- VBRookie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top