3
我正在使用複選框控件並在CHeckChanged中獲取它的值。我得到了正確的值,但在IF條件下,它甚至爲檢查返回FALSE,爲什麼?爲什麼複選框返回false值?
protected void chkOverAllApproval_CheckedChanged(object sender, EventArgs e)
{
try
{
CheckBox chkOverAllApproval = sender as CheckBox; //True i.e. correct value
if (chkOverAllApproval.Checked == true) //return false and jump to else even for TRUE, why ?
{
mdlCertificate.Hide();
}}
是否將autopostback複選框設置爲true? –