Posted on: 11/15/2012 12:09:04 AM | Views : 349

Hello I have a drop down list in my webform:
<asp:DropDownList id="insertlist" runat="server" class="dropdown" AutoPostBack="True"> <asp:ListItem Value="truckdata">Truck</asp:ListItem> <asp:ListItem Value="accidentdata">Accident</asp:ListItem> <asp:ListItem Value="complaintdata">Complaint</asp:ListItem> <asp:ListItem Value="employeedata">Employee</asp:ListItem> <asp:ListItem Value="tollsdata">Tolls</asp:ListItem> <asp:ListItem Value="trailerdata">Trailer</asp:ListItem> </asp:DropDownList> Than in my code behind I have a switch statement that looks like this (just a snippet):

protected void dropNameSelect(object sender, EventArgs e) { switch (insertlist.SelectedItem.Text) { case "Employee": Label1.Text = "Employee ID: "; Label1.Visible = tru ...

Go to the complete details ...