[Note : replace "<" with < & ">" with >]
In web.config file
"<"appSettings">"
"<"add value="Initial Catalog=;Data Source=;UID=;password=" key="ConnectionString" ">"
"<"/add">"
"<"/appSettings">"
How to get the connection string in code [C#]
Import System.Configuration namespace
string connectionString = ConfigurationSettings.AppSettings["ConnectionString"];
No comments:
Post a Comment