Try using Single Update Panel....
DESIGNER:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Learn How Add ASP.NET 3.5 AJAX UpdatePanel Triggers</title></head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Country"></asp:Label>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
onselectedindexchanged="DropDownList1_SelectedIndexChanged">
</asp:DropDownList>
<br />
<asp:Label ID="Label2" runat="server" Text="State"></asp:Label>
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
Enabled="False" onselectedindexchanged="DropDownList2_SelectedIndexChanged">
</asp:DropDownList>
<br />
<asp:Label ID="Label3" runat="server" Text="City"></asp:Label>
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True"
Enabled="False" onselectedindexchanged="DropDownList3_SelectedIndexChanged">
</asp:DropDownList>
<br />
<asp:Label ID="Label4" runat="server"></asp:Label>
<br />
<br />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
CODE BEHIND:
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
List<string> l1 = new List<string>();
l1.Add(" ");
l1.Add("India");
l1.Add("USA");
foreach (string item in l1)
{
DropDownList1.Items.Add(item);
}
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList2.Enabled = true;
DropDownList3.Enabled = false;
Label4.Text = "";
List<string> l2 = new List<string>();
if (DropDownList1.SelectedItem.Text == "India")
{
DropDownList2.Items.Clear();
l2.Add(" ");
l2.Add("Maharashtra");
l2.Add("Goa");
foreach (string item in l2)
{
DropDownList2.Items.Add(item);
}
}
else
{
DropDownList2.Items.Clear();
l2.Add(" ");
l2.Add("Indiana");
l2.Add("Texas");
foreach (string item in l2)
{
DropDownList2.Items.Add(item);
}
}
}
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList3.Enabled = true;
List<string> l3 = new List<string>();
if (DropDownList2.SelectedItem.Text == "Maharashtra")
{
DropDownList3.Items.Clear();
l3.Add(" ");
l3.Add("Pune");
l3.Add("Mumbai");
foreach (string item in l3)
{
DropDownList3.Items.Add(item);
}
}
else if (DropDownList2.SelectedItem.Text == "Goa")
{
DropDownList3.Items.Clear();
l3.Add(" ");
l3.Add("Panji");
l3.Add("Vasco");
foreach (string item in l3)
{
DropDownList3.Items.Add(item);
}
}
else if (DropDownList2.SelectedItem.Text == "Indiana")
{
DropDownList3.Items.Clear();
l3.Add(" ");
l3.Add("Wilkinson");
l3.Add("Morocco");
foreach (string item in l3)
{
DropDownList3.Items.Add(item);
}
}
else if (DropDownList2.SelectedItem.Text == "Texas")
{
DropDownList3.Items.Clear();
l3.Add(" ");
l3.Add("Archer City");
l3.Add("Bryan");
foreach (string item in l3)
{
DropDownList3.Items.Add(item);
}
}
}
protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
{
Label4.Text = DropDownList1.SelectedItem.Text.ToString() + " " + DropDownList2.SelectedItem.Text.ToString() + " " + DropDownList3.SelectedItem.Text.ToString();
}
}