I need some help.
I want to hadle panel from a dropdownlist.Suppose i have a dropdownlist,named dropdownlist1.It has two location on it.I want to use two indivitual panel for each loactions.when i'll select location1,then panel1 will visible and if i choose location2 then panel2 will visible.
Here's my code..please help me.
thnk u...
Here's my .NET code
Location:
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="changed">
<asp:ListItem>howrah
<asp:ListItem>kolkata
<asp:Panel ID="Panel3" runat="server" Width="456px" Visible="False">
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True">
<asp:ListItem>ballygung
<asp:ListItem>garia
<asp:ListItem>jadabpur
<asp:Label ID="Label4" runat="server" Text="Label">
<asp:Panel ID="Panel4" runat="server" Visible="False" Width="458px">
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True">
<asp:ListItem>Nabanna
<asp:ListItem>colg ghat
<asp:ListItem>ds lane
Here's my C# code
namespace problem
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
<pre lang="c#">
protected void changed(object sender, EventArgs e)
{
Label3.Text = "your current location : " + DropDownList1.SelectedItem.Text;
if (DropDownList1.SelectedValue.ToString()=="howrah")
Panel3.Visible = true;
else
Panel4.Visible = false;
}