Click here to Skip to main content
14,970,418 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
ASP.NET
<asp:Label ID="Label1" runat="server" Text="select Name of project           :-"></asp:Label>
            <%--  <asp:DropDownList ID="DropDownList1" runat="server" class="form-control"></asp:DropDownList>--%>
                   <asp:DropDownList ID="DropDownList1" runat="server"    class="form-control"    AutoPostBack="true" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" ></asp:DropDownList>
                       <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DropDownList1" ErrorMessage="Please Enter Project Name.." ForeColor="#FF5050"></asp:RequiredFieldValidator>


                  </div>           </div>
Posted
Comments
   
????

1 solution

Use Update Panel.

Eg :

ASP.NET
<asp:ScriptManager ID="ScriptManager"
                              runat="server" />
           <asp:UpdatePanel ID="UpdatePanel1"
                            UpdateMode="Conditional"
                            runat="server">
               <ContentTemplate>
                 <asp:dropdownlist id="DropDownList1" runat="server" class="form-control" autopostback="true" onselectedindexchanged="DropDownList1_SelectedIndexChanged" xmlns:asp="#unknown"></asp:dropdownlist>
                       <asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" controltovalidate="DropDownList1" errormessage="Please Enter Project Name.." forecolor="#FF5050" xmlns:asp="#unknown"></asp:requiredfieldvalidator>
               </ContentTemplate>
           </asp:UpdatePanel>



Good luck.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900