About Me

My photo
Northglenn, Colorado, United States
I'm primarily a BI Developer on the Microsoft stack. I do sometimes touch upon other Microsoft stacks ( web development, application development, and sql server development).

Monday, September 25, 2006

MS ASP.Net Assessment Question: Validate Email Address

You create a Web Form that enables users to confirm their e-mail addresses.

You need to validate that users type e-mail addresses on the Web Form and that the e-mail addresses exist in a database.

What should you do?

A) Configure a RequiredFieldValidator control, a RegularExpressionValidator control, and a CustomValidator control.
B) Configure a RegularExpressionValidator control.
C) Configure a CompareValidator control.
D) Configure a RequiredFieldValidator control and a RegularExpressionValidator control.

A)Best Answer, by having the controls use for checking for populating textboxes and valid email address, then you will have to use the custom validator to check if both textboxes are also similar.
B)Wrong, since the regular expression validator doesn't check unless data has been entered into the textbox.
C)Wrong, only compares two textboxes, won't check if they are correct.
D) Wrong, would check for populate field and correct format for email, but not if two textboxes are similar.

No comments: