设计如图:
打开源:
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="btnGetPanleNext" runat="server" Text="注册"
onclick="btnGetPanleNext_Click" />
<asp:Panel ID="PanleNext" runat="server">
<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
<asp:TextBox ID="txtPassWrod" runat="server"></asp:TextBox>
<asp:Button ID="btnSure" runat="server" Text="确定" onclick="btnSure_Click" />
</asp:Panel>
</div>
<asp:Panel ID="panelMoreInfo" runat="server">
你选择的方向:<asp:RadioButton ID="radioCSharp" runat="server" GroupName="Language" Text="C#" />
<asp:RadioButton ID="radioJava" runat="server" GroupName="Language" Text="VB" />
</asp:Panel>
</form>
</body>
后置文件:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
this.PanleNext.Visible = false;
this.panelMoreInfo.Visible = false;
}
}
双击注册
protected void btnGetPanleNext_Click(object sender, EventArgs e)
{
this.PanleNext.Visible = true;
this.panelMoreInfo.Visible = false;
}
双击确定
protected void btnSure_Click(object sender, EventArgs e)
{
this.panelMoreInfo.Visible = true;
this.PanleNext.Visible = false;
}