当前位置: 代码迷 >> ASP.NET >> asp.net怎么将多个TextBox循环插入到数据库中
  详细解决方案

asp.net怎么将多个TextBox循环插入到数据库中

热度:5083   发布时间:2013-02-25 00:00:00.0
asp.net如何将多个TextBox循环插入到数据库中
举个例子,页面上有三个TextBox,我想请问一下如何循环将这个三个TextBox里值插入到数据库中?

------解决方案--------------------------------------------------------
用循环啊
C# code
for(int i = 1;i<n;i++){    TextBox txt = (TextBox)(this.FindControl("textbox" + i)     string strTs = txt.Text    if (strTs != "")    {      //执行你的操作   }}
  相关解决方案