我有一個更新面板,其中包含一個複選框和一個面板,複選框的自動回發屬性是真實的,我想使複選框被選中時面板可見,但是當我點擊複選框頁面時刷新:(爲什麼我的更新面板不起作用?
代碼:
<asp:UpdatePanel runat="server" ID="updDate">
<ContentTemplate>
<tr>
<td>
<br/>
Website Status
<br/>
</td>
<td>
<br/>
<asp:CheckBox runat="server" ID="chkUnderConstruction" Text=" Is Website Active?"
AutoPostBack="True"></asp:CheckBox>
<br/>
</td>
</tr>
<asp:Panel runat="server" ID="pnlDate">
<tr>
<td>Activation Date</td>
<td>
Day: <asp:TextBox runat="server" ID="txtDate" Width="30">
</asp:TextBox>
Month: <asp:TextBox runat="server" ID="TextBox1" Width="30">
</asp:TextBox>
Year : <asp:TextBox runat="server" ID="TextBox2" Width="30">
</asp:TextBox>
</td>
</tr>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
pageLoad的代碼:
pnlDate.Visible = chkUnderConstruction.Checked;
做你把'的 ' –
scofield
2013-03-22 07:00:18