如何一次将GridView数据保存到数据库中 [英] How to save gridview data into database at a time

查看:145
本文介绍了如何一次将GridView数据保存到数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

请帮我...

我的gridview有多行,我想一次将gridview的所有数据保存到数据库中,
即,没有循环

我该怎么办?

Hi All,

Please help me ...

i have gridview having multiple rows and i want to save all data of the gridview into database at a time ,
ie., without looping

how can i do it?

推荐答案

http://forums.asp.net/t/1634013.aspx/1 [ ^ ]
如何从GridView中保存数据 [ ^ ]
http://www.aspsnippets. com/Articles/Add-record-to-database-using-ASP.Net-GridView-EmptyDataTemplate-and-FooterTemplate.aspx [
http://forums.asp.net/t/1634013.aspx/1[^]
How I can save the data from GridView to the database?[^]
http://www.aspsnippets.com/Articles/Add-record-to-Database-using-ASP.Net-GridView-EmptyDataTemplate-and-FooterTemplate.aspx[^]


请参阅

您是否正在使用实体框架?如果您使用EntityDataSource而不是SqlDataSource,则这是可能的.当您在后面的代码中获得数据时,只需将其附加到实体上下文即可.
Are you using the entity framework? This is possible if you use an EntityDataSource instead of a SqlDataSource. When you get the data in the code behind, you can just attach it to an entity context.


这篇关于如何一次将GridView数据保存到数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆