• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 439
  • Last Modified:

ASP.NET Validate DropDownList in a user control

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
stretch73
Asked:
stretch73
  • 2
  • 2
1 Solution
 
prairiedogCommented:
You should do the validation in the user control, not in the page that uses the user control.
0
 
stretch73Author Commented:
pd,

Would you please expand on that?  
0
 
prairiedogCommented:
You should add the RequiredFieldValidator on the user control form. Does it make sense?
0
 
stretch73Author Commented:
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

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now