Repeater 如何遍历单元格数据,然后insert 到数据库中? 从一个表中读取数据到Repeater,Repeater中增加两列放入DropDownList,进行选择内容。然后所有行都处理好了后,把Repeater中的所有行一起insert 到数据库的另一个表中。怎么实现?谢谢啦。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 protected void Button1_Click(object sender, EventArgs e) { foreach (RepeaterItem item in this.Repeater1.Items) { DropDownList dll = item.FindControl("ddl_Group") as DropDownList; HiddenField hf = item.FindControl("HiddenField1") as HiddenField; if (dll != null && hf != null) { string Group_ID = dll.SelectedValue == "-1" ? "" : dll.SelectedValue; string User_ID = hf.Value; PXCLASS_STUDENTInfo studentInfo = oStudent.Get(ClassID, User_ID); studentInfo.GROUP_ID = Group_ID; oStudent.Update(studentInfo); } } oJavaScript.Alert("保存成功"); this.MultiView1_ActiveViewChanged(sender, e); }不需要的可以删掉 有没有人做过asp.net进度条 swfUpload呀,求救。。 profile的意思是? 关于gridview的问题 关于IIS的问题大家快点来帮忙啊``` 刷新再次提交的问题 treeview上下移动项(asp.net) 怎么样将数据库的连接词放在某一个地方,而不是每个页面上都写一遍? 微网站原理。。 如何将datagrid(有模板列)的编辑,删除事件后置到代码文件. 路边的野花你不要踩 求工厂模式三层的正确搭建方式及引用关系 关于 double 与 float 类型的问题
protected void Button1_Click(object sender, EventArgs e)
{
foreach (RepeaterItem item in this.Repeater1.Items)
{
DropDownList dll = item.FindControl("ddl_Group") as DropDownList;
HiddenField hf = item.FindControl("HiddenField1") as HiddenField;
if (dll != null && hf != null)
{
string Group_ID = dll.SelectedValue == "-1" ? "" : dll.SelectedValue;
string User_ID = hf.Value;
PXCLASS_STUDENTInfo studentInfo = oStudent.Get(ClassID, User_ID);
studentInfo.GROUP_ID = Group_ID;
oStudent.Update(studentInfo); }
}
oJavaScript.Alert("保存成功");
this.MultiView1_ActiveViewChanged(sender, e);
}
不需要的可以删掉