<td align="center">
                            <asp:LinkButton ID ="btnvip" runat ="server" CommandArgument='<%#Eval("id") %>' CommandName="edit" Text ="修改"></asp:LinkButton>
                        </td>
                         <td align="center">
                                <asp:HiddenField ID="hf" runat="server" Value='<%#Eval("Id") %>'/>
                            </td>
             </tr>

protected void repeater1_bind(object source, RepeaterCommandEventArgs e)
 {

if (e.CommandName.Equals("edit"))
        {
            for (int i = 0; i < rptlist.Items.Count; i++)
            {
                TextBox txtcom = (TextBox)rptlist.Items[i].FindControl("tbvip");
                HiddenField hf = (HiddenField)rptlist.Items[i].FindControl("hf");
                int id = int.Parse(hf.Value);
                if (txtcom.Text.ToString() != "" && txtcom.Text.ToString() != null)
                {
                    DataTable dtvip = DB.GetDataTable("businessid,busoname,businessname", "business", "businessname='" + txtcom.Text.Trim() + "'", "");
                    DB.Operate("update table  set cmId='" + dtvip.Rows[0][0].ToString() + "',Cname='" + dtvip.Rows[0][1].ToString() + "'where id='" + id + "'");
                }

}
            Display();
        }

}

最新文章

  1. poj.1703.Find them, Catch them(并查集)
  2. Find them, Catch them(poj 1703)
  3. linux修改hostname
  4. python语法笔记(一)
  5. linux (centos 6.4)安装自定义分区方案(转载)
  6. 关于linux内存使用情况
  7. sde需要注意的几个常见问题
  8. CYQ.Data 支持WPF相关的数据控件绑定.Net获取iis版本
  9. 做环信聊天布局时遇到的问题(UITextView自适应高度和光标位置不正常)
  10. Java进阶(二十五)Java连接mysql数据库(底层实现)
  11. VS2017 新建win32控制台应用
  12. idea properties编码问题
  13. Ubuntu下安装vsftpd
  14. java基础50道编程题
  15. 看了这个才发现jQuery源代码不是那么晦涩
  16. Charles 抓取 iphone https的设置方式
  17. php -- 文件操作类(文件或文件夹的:创建、删除、复制、移动)
  18. LM3S之boot loader学习笔记-1
  19. 【BZOJ】2160: 拉拉队排练(Manacher)
  20. PAT——1008. 数组元素循环右移问题

热门文章

  1. 使用WebDriver遇到的那些坑(转)
  2. windows添加和删除服务
  3. poj3904
  4. 手动创建第一个JSP应用
  5. struts1老古董配置
  6. Fresco 源码分析(一) DraweeView-DraweeHierarchy-DraweeController(MVC) DraweeView的分析
  7. Python语言开发的一些问题
  8. Linux中获取当前程序的绝对路径
  9. mac平台scala开发环境搭建
  10. Java Hour 38 Weather ( 11 ) &ndash; fastjson