You cannot connect to Database with
html
controls.
You have to use
Server-Side Controls
, else add
runat = "server"
property to html controls.
For example- On Server side Button Click Event, you can create a
SQL Connection by the help of
ADO.NET
and connect to Database.
Refer-
Using ADO.NET for beginners[
^].