page directive
<%@ Register Src="controls/wuc1.ascx" TagName="control1" TagPrefix="ucq" %>
<%@ Register Src="controls/wuc2.ascx" TagName="control2" TagPrefix="ucq" %>
<%@ Register Src="controls/wuc3.ascx" TagName="control3" TagPrefix="ucq" %>
within page body(Place Holder):
<ucq:control1 id="control1" runat="server" />
<ucq:control2 id="control2" runat="server" />
<ucq:control3 id="control3" runat="server" />
Code behind
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
control1.Visible=false;
control2.Visible=false;
control3.Visible=false;
}
}
protected void btnCommand_Click(object sender, EventArgs e)
{
if(!string.IsNullOrEmpty(textbox1.text))
{
if(textbox1.text.tostring()=="1")
control1.Visible=true;
if(textbox1.text.tostring()=="2")
control2.Visible=true;
if(textbox1.text.tostring()=="3")
control3.Visible=true;
}
}
But if you can do using javascript that will be better.
Let me know your feedback.