Visual Web Developer SQL Query via Button

亡梦爱人 提交于 2020-02-08 06:06:25

问题


I am creating a web site using Visual Web Developer 2010. I currently have a datasource that gets its information from the Access database that has been added into the APP_Data section. 1) How would I run a query by using a button that been placed on the website.

2) How would I display the result of that query into a datagridview or some other data control?


回答1:


You can add a gridview to the form and then configure the access data source to use a where clause to select rows. Then just choose the textbox control you want to get the value from and add a button to do a post-back, which will run the query.

If you need more help with this let me know, I've got a working sample.



来源:https://stackoverflow.com/questions/3569565/visual-web-developer-sql-query-via-button

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!