Solved

ASP.NET Validate DropDownList in a user control

Posted on 2008-10-09
4
423 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
Comment Utility
You should do the validation in the user control, not in the page that uses the user control.
0
 

Author Comment

by:stretch73
Comment Utility
pd,

Would you please expand on that?  
0
 
LVL 22

Accepted Solution

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

Author Closing Comment

by:stretch73
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now