且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用GridView中的下拉列表更新数据库

更新时间:2023-02-11 22:16:41

如果这是一个Web项目,您没有这么说.无论哪种方式,答案都是您使用SQL进行所需的更改.如果它是一个Web项目,我将使用一个AJAX调用,并传递正确的ID,但是通过两种方式,您都可以处理选择更改事件或提交"按钮的事件,以运行SQL .
If this is a web project, you did not say so. Either way, the answer is that you use SQL to make the changes you want. If it''s a web project, I''d use an AJAX call, passing in the correct id, but both ways, you handle a selection changed event, or the event of a ''commit'' button, to run your SQL.


请参考此链接.它会逐步教您.

http://technico.qnownow.com/2012/04 /05/use-dropdownlist-in-asp-net-gridview-control/ [
refer to this link. It teach you step by step.

http://technico.qnownow.com/2012/04/05/use-dropdownlist-in-asp-net-gridview-control/[^]