我有这个Default.aspx设计
<head runat="server">
<title></title>
<style type="text/css">
.heading
{
text-align: center;
border-style: double;
background-color:#F2A988;
font-family:Sans-Serif;
font-weight:bold;
}
#wrapper {
margin: 0 auto;
width: 400px;
text-align:left;
}
.style1
{
text-align: center;
font-family:Sans-Serif;
}
.style2
{
font-family: Arial, Helvetica, sans-serif;
}
</style>
</head>
<body style="height: 642px; width: 911px; " id="wrapper">
<form id="form1" runat="server">
<div class="heading">
Sheridan Computer Club - Inquiry Form</div>
<br />
<asp:Calendar ID="Calendar1" runat="server" Font-Names="Arial"></asp:Calendar>
<br />
<asp:Button ID="btnInfo" runat="server" Font-Names="Arial"
onclick="btnInfo_Click" style="font-weight: 700"
Text="I'd like to receive more information!" Width="261px" />
<asp:Panel ID="form" runat="server" Height="259px" Width="392px"
Visible="False">
<span class="style2">If you would like to join the club or receive more
information about the club fill in the form below & click submit button.<br />
<br />
</span><b>
<asp:Label ID="Label1" runat="server" Font-Names="Arial" Text="First Name:"></asp:Label>
</b>
<asp:TextBox ID="TextBox1" runat="server" Width="184px"></asp:TextBox>
</asp:Panel>
<div id="meeting"
style="position:relative; top: -359px; left: 339px; width: 232px; height: 64px; text-align: center; margin-top: 0px; font-family: Arial; font-weight:bold;">
<br />
<asp:Label ID="lblDate" runat="server"></asp:Label>
<br />
</div>
<div style="width: 308px; position:relative; top: -552px; left: 307px; margin-top: 0px;"
class="style1">
Click Below to find out when
<br />
the club meets next</div>
<div style="position:relative; top: -591px; left: 646px; width: 274px; height: 289px; font-family:Sans-Serif;">
<b>View Members by Program:<br />
<asp:ListBox ID="ListBox1" runat="server" Height="175px" Width="263px">
</asp:ListBox>
</b></div>
<div style="position:relative; top: -797px; left: 351px; width: 192px; height: 32px; text-align: center; margin-top: 0px;">
<asp:Button ID="Button1" runat="server" Text="Next Meeting"
onclick="Button1_Click" />
</div>
</form>
</body>
</html>
问题是,面板干扰了我放置的div,只有在我点击了我不想要的按钮后才会加载Div。我正在做的是点击隐藏按钮本身的按钮&amp;显示包含提交表单的面板。
以下是我正在使用的button_click的代码,
protected void btnInfo_Click(object sender, EventArgs e)
{
btnInfo.Visible = false;
form.Visible = true;
}
我无法弄清楚出了什么问题?
答案 0 :(得分:0)