Importing one file from another
Hello all I wanna create a ASP.NET c# file named "DBconnect.aspx" where I will provide all my MYSQL database settings. I would like to import these settings without re-entering database details to another page.
Of course have to mention the namespace with Public class but I do need to sam开发者_高级运维ple syntax to make this.
If you're using MySql.Data.MySqlClient.MySqlConnection
, you should really just use connection strings in your web.config
.
The syntax for a MySQL connection string can be found here.
精彩评论