HI WELCOME TO KANSIRIS

how to write connection string in web.config for mysql in asp.net

Leave a Comment
<connectionstrings>
  <add name="ApplicationServices" connectionstring="Data Source=00.0.0.0;Initial Catalog=dbname;User Id=user;Password=pass" providername="MySql.Data.MySqlClient" />
</connectionstrings>

<add name="MySqlConnectionString" connectionString="server=127.0.0.1;User Id=root;password=bpdash;database=sample"

   providerName="MySql.Data.MySqlClient" />
CS code

ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString;

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.