如何从TextBox&添加数据到GridView然后从gridview向数据库添加数据 [英] How to add Data To GridView From TextBox & then add data to database from gridview
本文介绍了如何从TextBox&添加数据到GridView然后从gridview向数据库添加数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请一些人告诉我如何从TextBox添加数据到GridView然后从gridview向数据库添加数据
请帮我解决这个问题....
pls some one tell that how to add Data To GridView From TextBox & then add data to database from gridview
Pls help me to solve this....
推荐答案
您需要更改步骤..首先更新数据库然后用gridview绑定..
看看这个...
使用Gridview插入,更新,删除。 ..简单方法 [ ^ ]
You need to change the steps..first update database then bind with gridview..
Have a look at this one..
Insert, Update, Delete with Gridview ... Simple Way[^]
浏览此链接..
插入,更新,删除ASP.NET Gridview,DataSource作为SQL Server,MS Access(mdb / accdb),XML和Framework为2.0 / 3.0 / 3.5 / 4.0(VS 2005/2008/2010) [ ^ ]
好运。
Go through this link..
Insert, Update, Delete in ASP.NET Gridview, DataSource as SQL Server, MS Access (mdb/accdb), XML and Framework as 2.0 / 3.0 / 3.5 / 4.0 (VS 2005/2008/2010)[^]
Best of luck.
你可以创建一个临时的DataTable,在那里从TextBox动态创建数据行并将该数据绑定到gridView,然后在某个事件上创建将该数据表更新为数据库。
You can create a temporary DataTable, In that create datarow dynamically from the TextBox and Bind That Datatable To gridView and after that on certain event update that datatable to database.
这篇关于如何从TextBox&添加数据到GridView然后从gridview向数据库添加数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文