DROPDOWN LIST VALIDATION

Ankita Pandey

Total Post:183

Points:1285
Posted by  Ankita Pandey
 767  View(s)
Ratings:
Rate this:

I need to perform a validation to check whether a TextBox value is empty on Dropown list selected Index change using validation controls in asp.net

  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: DropDown List Validation

    Hi Ankita, 


    I hope this will work fine.

        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

        <asp:DropDownList ID="DropDownList1" runat="server" CausesValidation="true" AutoPostBack="true">

        </asp:DropDownList>

    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="TextBox1" runat="server" ErrorMessage="Please Enter the Value"></asp:RequiredFieldValidator>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!