I have two pages: Default.aspx and Target.aspx. On Default.aspx are two buttons:
Button1 redirects to ("~/Target.aspx?mode=\"drop\"");
Button2 redirects to ("~/Target.aspx?mode=\"textbox\"");
On Target.aspx is following behind code:
string display = Request.QueryString["mode"];
switch (display)
{
case "textbox":
TextBox1.Visible = true;
DropDownList1.Visible = false;
break;
case "drop":
TextBox1.Visible = false;
DropDownList1.Visible = true;
break;
}
As you can see, in case of Button1, Target.aspx should hide TextBox1 and display DropDownList1. However this doesn't work. Can you help me ? Thanks