What is connection strings?

Please explain me what is connection strings with suitable example.

Last updated:1/20/2020 1:02:41 AM

1 Answers

Nishi Tiwari
Nishi Tiwari

ConnectionStrings

The most common section of web.config file the connectionStrings sections allows us to store multiple connection strings that are used in the application. The connectionStrings tag consists of child element with attributes name and connectionstring which is used to identify the connectionstring and the other is also used to connect to the database server respectively.

The general connectionstring settings are shown below in the code:

<connectionStrings>

    <add name ='cnn' connectionString ='Initial Catalog = master;
  Data Source =localhost; Integrated Security = true'/>
</connectionStrings>

What is connection strings?

Answer