I am new to asp.net and C#. I am using a connection string in each and every page to connect to database and get results (the connection string is shown in the below code). Is there any way I can make the connection string centralized? So that I don't have to call it in each and every page?
Can anyone help me to solve this problem? please..
con = new SqlConnection("Data Source=localhost\\sqlexpress;Initial Catalog=ewadb;Integrated Security=SSPI");
//data = new SqlDataAdapter("SELECT * FROM deals", con);
//dset = new DataSet();
//data.Fill(dset, "deal");