次のコードを呼び出します。
protected void Page_Load(object sender, EventArgs e)
{
//Note that this is not my actual code
//this illustrates what happens
if(IsPostBack)
{
CheckBox1.Checked = true;
}
}
しかし、その結果、ポストバック後、チェックボックスは私のコマンドを「true」に設定することを尊重せず、コントロールで選択したユーザーにコードをリセットします。
それを防ぐ方法は?