How to connect sql database to your c# program

Depends on the type of database engine being used, but if you mean MSSQL then there are a lot of tutorials and sample code on the subject. For example, this one describes the process in detail.

Otherwise, try google search for "C# SQL Database".

in your webconfig file
in configuration tag
<connectionStrings>
write
</connectionStrings>