事件代码:
foreach(DataGridItem CheckBoxItem in ArticleList.Items)
{
CheckBox ischeck = (CheckBox)ArticleList.FindControl("DeleteCheckBox");
if(ischeck == true)
{
.......;
}
}if(...)这行报错,到底是怎么回事??
foreach(DataGridItem CheckBoxItem in ArticleList.Items)
{
CheckBox ischeck = (CheckBox)ArticleList.FindControl("DeleteCheckBox");
if(ischeck == true)
{
.......;
}
}if(...)这行报错,到底是怎么回事??
{
if (CheckBoxItem is CheckBox)
{
CheckBox ischeck = (CheckBox)ArticleList.FindControl("DeleteCheckBox");
if(ischeck == true)
{
.......;
}
}
}
请问这句话是什么意思?
依然报同样的错
{
CheckBox ischeck = (CheckBox)CheckBoxItem.FindControl("DeleteCheckBox");
if(ischeck.Checked)
{
.......;
}
}
{
string str1 = ((HtmlInputCheckBox)this.dg_List.Items[intDs].FindControl("dg_List_chk_Receive")).Checked ?"Y":"N" ;
string str2 = ((HtmlInputCheckBox)this.dg_List.Items[intDs].FindControl("dg_List_chk_Approve")).Checked ?"Y":"N" ;
string str3 = ((HtmlInputCheckBox)this.dg_List.Items[intDs].FindControl("dg_List_chk_Return")).Checked ?"Y":"N" ;
string str4 = ((HtmlInputCheckBox)this.dg_List.Items[intDs].FindControl("dg_List_chk_Release")).Checked ?"Y":"N" ; // whether change
if(str1.Equals((dsUpt.Tables[0].Rows[intDs]["rpt_receive"].ToString())) &&
str2.Equals((dsUpt.Tables[0].Rows[intDs]["rpt_approve"].ToString()))&&
str3.Equals((dsUpt.Tables[0].Rows[intDs]["rpt_return"].ToString())) &&
str4.Equals((dsUpt.Tables[0].Rows[intDs]["rpt_releaSe"].ToString())))
{
continue;
}
else
{
dsUpt.Tables[0].Rows[intDs]["rpt_receive"] = str1;
dsUpt.Tables[0].Rows[intDs]["rpt_approve"] = str2;
dsUpt.Tables[0].Rows[intDs]["rpt_return"] = str3;
dsUpt.Tables[0].Rows[intDs]["rpt_release"] = str4;
dsUpt.Tables[0].Rows[intDs]["UPDT_UID"] = UserInfo.UID;
}
}
崩溃!!
谢谢大家帮助!结贴!