請問一下aspx畫面讀完後
再不重新讀取網頁的情況下
如何用一個按鈕,變更CHECKBOX的狀態?
下方沒效果,應該只能用jquery或javascript來做到
請問有相關關鍵字可提供嗎?
protected void Button_Click(object sender, ImageClickEventArgs e)
{
.
.
.
CB.Checked = true;
}
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:ImageButton ID="ImageButton1" runat="server" OnClick="ImageButton1_Click" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ImageButton1" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
CheckBox1.Checked = true;
}
你是要這樣的效果?