逐句跟踪执行一下,看看哪步又把他设回去了.或者你没重新绑定gridview
解决方案 »
- 请问JS如何改变<td>的背景图片??附代码!
- 标准mvc2.0程序,如何把Views文件夹改成Pages
- 关于IE6,IE7共存 Error:The download of the specified resource had failed,
- visual studio 中 生成解决方案和重新生成解决方案有什么区别?
- asp.net ViewState 超時
- 为什么这个代码报错?
- 一个小问题~!~!~!~!~!~!~!
- 怎样在asp.net中导入Excel表格?
- IsPostBack中要是没有代码——CheckBox就选不中,很奇怪的问题。
- 插入数据不成功的问题,明儿早结帖
- ASP.net 页面超时
- 在.NET2003里怎样实现DataGrid水晶报表打印 WEB程序的?在线等!望高手速度解决!谢谢!急!急!急!!!
foreach(GridViewRow row in gvPackage.Rows)
{
CheckBox cb = (CheckBox)row.FindControl("ckAutoRenew");
AOrderPlanRow aOrderPlanRow = ((DataRowView)row.DataItem).Row as AOrderPlanRow;
aOrderPlanRow.bCurrentMonthlyPlan = (cb != null & cb.Checked) ? true : false;
//...
}
if(!IsPostBack)
{}
{
int index = ((GridViewRow)((Button)e.CommandSource).NamingContainer).RowIndex;
RadioButton RadioButton1 = GridView1.Rows[index].FindControl("RadioButton1") as RadioButton; if (RadioButton1.Checked)
{
Name = RadioButton1.Text;
}
int id =int.Parse( GridView1.DataKeys[index].Value.ToString());
}