RadioButtonList rbls=(RadioButtonList)myDataGrid.Items[i].FindControl("RadioButtonList1"); TextBox tb=(TextBox)myDataGrid.Items[i].FindControl("TextBox1"); string sql1="update hr163 set hr163.reg_sign=hr163.reg_sign||','||"+Request["id1"]+",hr163.num1_163='"+tb.Text.ToString()+"' where pemn='"+myDataGrid.Items[i].Cells[0].Text.ToString()+"' and hr163.id1 in (select hr162.id1 from hr162 where hr162.id2="+Request["id2"]+") and "+rbls.SelectedItem.Value.ToString()+"=1"; string sql2="update hr163 set hr163.num1_163='"+tb.Text.ToString()+"' where pemn='"+myDataGrid.Items[i].Cells[0].Text.ToString()+"' and hr163.id1 in (select hr162.id1 from hr162 where hr162.id2="+Request["id2"]+")"; Excute(sql1); Excute(sql2); Response.Write( "<script>alert(\"评分成功!!\");window.location='pingfen.aspx?id1="+Request["id1"]+"&&id2="+Request["id2"]+"';</script>");
你可能没看我上面发的那个网址,看了应该就会明白
我现在不是数据提交的问题,而是动态添加表格/表单的问题,然后下拉菜单的数据绑定
里面的元素呢?还有控件~都可以动态写么?
动态添加的控件值也都可以获取么?
看来也只能用笨办法了....唉
{
RadioButtonList rbls=(RadioButtonList)myDataGrid.Items[i].FindControl("RadioButtonList1");
TextBox tb=(TextBox)myDataGrid.Items[i].FindControl("TextBox1");
string sql1="update hr163 set hr163.reg_sign=hr163.reg_sign||','||"+Request["id1"]+",hr163.num1_163='"+tb.Text.ToString()+"' where pemn='"+myDataGrid.Items[i].Cells[0].Text.ToString()+"' and hr163.id1 in (select hr162.id1 from hr162 where hr162.id2="+Request["id2"]+") and "+rbls.SelectedItem.Value.ToString()+"=1";
string sql2="update hr163 set hr163.num1_163='"+tb.Text.ToString()+"' where pemn='"+myDataGrid.Items[i].Cells[0].Text.ToString()+"' and hr163.id1 in (select hr162.id1 from hr162 where hr162.id2="+Request["id2"]+")";
Excute(sql1);
Excute(sql2);
Response.Write( "<script>alert(\"评分成功!!\");window.location='pingfen.aspx?id1="+Request["id1"]+"&&id2="+Request["id2"]+"';</script>");
}