In Globle setting connectionString is directly coding in web.config file.
Step 1
In web.config file adding three things.
Step 2
In Default. aspx.cs file adding
using namespace:
string mystr = ConfigurationManager.ConnectionStrings["abc"].ConnectionString;
Output
Step 1
In web.config file adding three things.
- add name="abc"
- "Data Source=Raksha
- Initial Catalog=st
- Integrated Security=true"
Step 2
In Default. aspx.cs file adding
using namespace:
string mystr = ConfigurationManager.ConnectionStrings["abc"].ConnectionString;
Output
0 comments:
Post a Comment