直接看代码:
TextBox txtTest = gvIndustryLotteryType.Rows[e.RowIndex].FindControl("txtNewLotteryTypeName") as TextBox;
if( null == txtTest)
{
//........
}
else
{
//
}
好处:不会因转换失败而抛异常。
直接看代码:
TextBox txtTest = gvIndustryLotteryType.Rows[e.RowIndex].FindControl("txtNewLotteryTypeName") as TextBox;
if( null == txtTest)
{
//........
}
else
{
//
}
好处:不会因转换失败而抛异常。