hi friend...
if your connection with MySQL then...
1. Add Name Space on your page e.g-
using MySql.Data.MySqlClient;
2. then make object of connection class..e.g-
MySqlConnection con = new MySqlConnection();
3.then configure your connection on your load event..e.g-
con.ConnectionString = ConfigurationManager.ConnectionStrings["GP"].ConnectionString;
//["GP"] is ur connection name that you make in web.config page e.g-
<connectionstrings>
<add name="GP" connectionstring="server=localhost;User Id=root;password=password;database=demo; pooling=false" providername="MySql.Data.MySqlClient" />
</connectionstrings>
and In Sql Server there is minute change in namespace(using System.Data.SqlClient;) and make object of SqlConnection con =new SqlConnection.
Thanks I think It Helps You!!!