如何使用visual studio / asp.net中的html控件建立数据库连接 [英] how to make connection to database with html controls in visual studio/asp.net
本文介绍了如何使用visual studio / asp.net中的html控件建立数据库连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友,
这里我要在visual studio中使用html控件连接到我的后端,所以我需要帮助,请建议我如何连接在HTML页面。感谢你
hello friends,
here im going to make a connection to my backend with html controls in visual studio , so i need help ,please suggest me how to connect in html page . thanking you
推荐答案
你无法用html
控件连接到数据库。
您必须使用服务器端控件
,否则添加runat =server
属性html控件。
例如 - 在服务器端按钮单击事件,您可以在<$ c的帮助下创建 SQL连接 $ c> ADO.NET 并连接到数据库。
参考 - 为初学者使用ADO.NET [ ^ ]。
You cannot connect to Database withhtml
controls.
You have to useServer-Side Controls
, else addrunat = "server"
property to html controls.
For example- On Server side Button Click Event, you can create a SQL Connection by the help ofADO.NET
and connect to Database.
Refer- Using ADO.NET for beginners[^].
这篇关于如何使用visual studio / asp.net中的html控件建立数据库连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文