Solved

ASP.NET Validate DropDownList in a user control

Posted on 2008-10-09
4
428 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 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb.net convert long time to mm:ss 23 22
IDE for Python 5 70
TFS 2015 Access denied. 1 30
C# XML Get Values 4 35
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

733 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