Recent Posts

Tags

Community

Email Notifications

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)

Archives

Validate DropDownList

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.

Comments

simple said:

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.
# July 22, 2005 9:22 AM

simple said:

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

# July 22, 2005 9:25 AM

simple said:

Thanx Haider

But i want to hav personal guide to explain. how do i go for it.pls give an idea.
# July 22, 2005 9:39 AM

simple said:

Hi Nimmi:
Tell me exactly how can I help you and I am more than ready to help you out.

Regards
# July 25, 2005 2:25 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)