where should write the connection string Show that it will
apply whole pages in the website

Answers were Sorted based on User's Feedback



where should write the connection string Show that it will apply whole pages in the website..

Answer / krushitha

you need to write the connection string in web.config.

Is This Answer Correct ?    4 Yes 0 No

where should write the connection string Show that it will apply whole pages in the website..

Answer / lakshmi

connection string saved in the web.config file:

<connectionstrings>
<add name="Appconnectionstring1"
connectionstring="server=localhost;User Id=sa;Password=
password;Database=Northwind; persist security info ="True"
providerName="system.data.sqlclient"/>
</connectionstrings>

Is This Answer Correct ?    3 Yes 0 No

where should write the connection string Show that it will apply whole pages in the website..

Answer / krushitha

It is a central repository from where you can retrieve it
and use it in all the pages. For example if you store the
connection string in a central place like a web.config file
you can retrieve those connection strings from the
web.config file and use it

Is This Answer Correct ?    2 Yes 0 No

where should write the connection string Show that it will apply whole pages in the website..

Answer / navin.cp

You can also pass a connection string in web.config file as:-

<appSettings>
<add key="ConStrName" value="your_ConStrValue"/>
</appSettings>

Is This Answer Correct ?    1 Yes 0 No

where should write the connection string Show that it will apply whole pages in the website..

Answer / payal

Config file we can write that is web.config and
machine.config

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

Difference between abstract class and interface

2 Answers   Fidelity,


In how many ways we can retrieve table records count?

0 Answers  


What is mvc in angular?

0 Answers  


how to use web services with code?(with example code)

1 Answers   Accenture,


extensibility in asp.net2.0

0 Answers  






What are the advantages of using Master Pages?

0 Answers   MCN Solutions,


What is session handling in a webfarm, how it can work with its limits?

0 Answers   Siebel,


diffrance between stored procedure & function in sql server?

2 Answers  


What is the use of HttpHandlers? When to use this?

0 Answers   Wipro,


How does dataset acts in a disconnected fashion ?

3 Answers   TCS,


what is the difference between assemblyinfo and webconfig files?

1 Answers  


what are the security certificates used in webservices?

0 Answers  


Categories