想做数据批量提交
View :<input type="text" name="username" /><input type="text" name="password" /><input type="text" name="username" /><input type="text" name="password" /><input type="text" name="username" /><input type="text" name="password" /><input type="text" name="username" /><input type="text" name="password" /><input type="text" name="username" /><input type="text" name="password" /><input type="text" name="username" /><input type="text" name="password" />多组相同字段的数据提交(有多少组数据由用户生成的)那么在
Action 这边如何接收数据并分别做insert?
View :<input type="text" name="username" /><input type="text" name="password" /><input type="text" name="username" /><input type="text" name="password" /><input type="text" name="username" /><input type="text" name="password" /><input type="text" name="username" /><input type="text" name="password" /><input type="text" name="username" /><input type="text" name="password" /><input type="text" name="username" /><input type="text" name="password" />多组相同字段的数据提交(有多少组数据由用户生成的)那么在
Action 这边如何接收数据并分别做insert?
解决方案 »
- UrlreWritingNet在IIS7的配置,急
- 在asp.net里调用外部程序,本机测试可以,但在windows server 2008上不行
- 如何吧论坛和主网站共享session实现单点登录啊,谢谢
- 这几个关于时间的配置选项有什么区别:sessionState的timeout, httpRunTime的executionTimeout...
- 第四次提问(新注册了个号,只要问题解决就给分了!),相信很多人都看过了,但问题还没解决!
- 有没有比较好的ASP.NET的QQ群啊?大家帮忙介绍介绍
- 如何利用树进行权限管理,请高手赐教
- 【被押宝游戏害惨了】
- 将Session存放到SQLServer中遇到的问题?
- 帮忙看看数据库里选出来的字段为什么在LABEL中显示不来,谢谢
- 急,各位帮忙看下,asp.net 问题
- asp.net mvc httphandler
<% for (int i = 0; i < totalcount; i++) { %>
<tr>
<td>
<%= Html.TextBox("username"+i.ToString(), "") %>
</td>
<td>
<%= Html.TextBox("password"+i.ToString(),"") %>
</td>
</tr>
<% } %>Action:public void BatchInsert()
{
for (int i = 0; i < totalcount; i++)
{
string name = "username" + i.ToString();
string username = Request[name];
name = "password" + i.ToString();
string password = Request[name];
//访问数据库,插入数据
......
}}
{
//访问数据库,插入数据
}
循环插入就是了~~