MSMVPS.COM
The Ultimate Destination for Blogs by Current and Former Microsoft Most Valuable Professionals.
Validate DropDownList
Bilal Haidar [MVP]

Syndication

All Links

Blogs I Read

My Articles

JavaScript & CSS

Date & Time

SQL Server 2000/2005

Articles I Read

ASP.NET Free Controls

MVFP (Most Valuable Forum Posts)

Here is an example of how to do so:

<form id="Form1" method="post" runat="server">
   <asp:DropDownList id="DropDownList1" runat="server">
       <asp:ListItem Value="-1">--> Choose  <--asp:ListItem>
       <asp:ListItem Value="1">Lebanonasp:ListItem>
       <asp:ListItem Value="2">Kuwaitasp:ListItem>
   </asp:DropDownList>
   <asp:RequiredFieldValidator id="RequiredFieldValidator1" 
runat="server" ErrorMessage="You must select a valid option" ControlToValidate="DropDownList1" InitialValue="-1"
Display="Dynamic" /
>
<P> <asp:Button id="Button1" runat="server" Text="Post Back" />
<P> <form>


Hope that helps,

Regards.


Posted Mon, Jul 18 2005 9:47 by simple

Comments

simple wrote re: Validate DropDownList
on Fri, Jul 22 2005 9:22
Hai, i just want to switch over to IT field. I hav some knowledge VB. Now i started to learn VB.net & ASP.net. I do not know how its going to help me. Is there anyone to help me personaly.
simple wrote re: Validate DropDownList
on Fri, Jul 22 2005 9:25
Hello, you can visit the http://forums.asp.net
This is the official forum for the ASP.NET. You would get the maximum knowledge there.

Regards

simple wrote ASP.Net
on Fri, Jul 22 2005 9:39
Thanx Haider

But i want to hav personal guide to explain. how do i go for it.pls give an idea.
simple wrote re: Validate DropDownList
on Mon, Jul 25 2005 14:25
Hi Nimmi:
Tell me exactly how can I help you and I am more than ready to help you out.

Regards

Add a Comment

(optional)  
(optional)
(required)  
Remember Me?


Copyright © is the original authors. Blog site is an independent site not sponsored by Microsoft. The Yoda blog server and the Brianna SQL server would like to thank www.ownwebnow.com and www.exchangedefender.com. They wouldn't be here and broadcasting without the generosity of Vlad Mazek and his companies.

Powered by Community Server (Commercial Edition), by Telligent Systems