Solved

ASP.NET Validate DropDownList in a user control

Posted on 2008-10-09
4
426 Views
Last Modified: 2013-12-17
I have a web form that has a user control containing a dropDownList of the fifty states.  I am trying to apply a RequiredFieldValidator to this control but it keeps erroring out.  Simply put, I need to figure out how to validate a control within a user control, on the client side if this is possible.

TIA,

N
0
Comment
Question by:stretch73
  • 2
  • 2
4 Comments
 
LVL 22

Expert Comment

by:prairiedog
ID: 22679274
You should do the validation in the user control, not in the page that uses the user control.
0
 

Author Comment

by:stretch73
ID: 22679721
pd,

Would you please expand on that?  
0
 
LVL 22

Accepted Solution

by:
prairiedog earned 500 total points
ID: 22679761
You should add the RequiredFieldValidator on the user control form. Does it make sense?
0
 

Author Closing Comment

by:stretch73
ID: 31504681
Wow, that was way easier than the other suggestions I had found.  

Thanks much prairiedog, have a great rest of your week.

N
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question