I am new at C#/.net programming and am creating a example website.I need the code for displaying a hidden textbox/listbox by selecting the item from another listbox.I’ve tried the code which is not correct,
protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
ListBox1.Items.Add("Sales");
ListBox1.Items.Add("Inventory");
ListBox1.Items.Add("Employee");
ListBox1.Items.Add("Cash Drop");
TextBox1.Visible = false;
if (ListBox1.SelectedItem.value == "Sales" )
{
TextBox1.Visible = true;
}
}
can anybody help me please!!!!!
And dont forget to turn
AutoPostBack="true"in your Listbox :