Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
  DropdownList in WebUserControl
Posted by Sanjeev Gupta on  2/20/2008 6:33:41 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
I am using asp.net2.0 and vs2005.
In Web user Control List of Product Bind in Drop Down List. This web User control drag in Contain Page.But i want when user click submit Button .then show the Message Please Select Product.Because Select Product Show in Drop Down Firstly in Drop Down List.

please Solve the Problam AnyBody using validation or javaScript Function

Post Your Reply Post New Question

 Viewer's Reply
Use JavaScript to validate
Answered By Moderator1 on 2/20/2008 7:35:29 PM
In your web user control validate the dropdown list with javascript. Set the value of the 'Select Product' to 0. Then

function CheckProductCombo()
if (document.getElementById('<%=DropDownList1.ClientID%>').value=="0")
alert('Select Product');
return false;

Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition - Free 207 Page Preview!
Washington Technology