Hey Guys,
I have a databound dropdownlist which has the following data items:
Select
Approved
Disapproved

I want that if the user selects "Select" then he should not be allowed to submit it.
Plkease help.

try this code...

in cs file:

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (DropDownList1.SelectedItem.Value == "Select")
        {
            Response.Write("dont do submission");
        }
        else
        {
            Response.Write("do submission");
        }
            
    }

In source here i have taken some items directly u can bound them from db...

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
            <asp:ListItem>Select</asp:ListItem>
            <asp:ListItem>Approved</asp:ListItem>
            <asp:ListItem>example</asp:ListItem>
        </asp:DropDownList></div>

try it..

This question has already been answered. Start a new discussion instead.