Validation By Control ASP.Net




    Untitled Page


    
    

        
            --Please Select--
            Red
            Green
            Blue
        
                                            runat="server" 
                                    ControlToValidate="DropDownList1"
                                    ErrorMessage="DropDownList1 Must Have a Value Selected" 
                                    InitialValue="--Please Select--"
                                    SetFocusOnError="True" 
                                    ValidationGroup="DDL">*