Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASP.NET Validate DropDownList in a user control

Posted on 2008-10-09
4
Medium Priority
?
435 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

604 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