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

What is the difference between a Stored procedure and function?

9 Answers  


Difference between response.redirect and server.transfer?

0 Answers  


What method must be overridden in a custom control? a) The Paint() method b) The Control_Build() method c) The Render() method d) The default constructor

1 Answers   Icertis, Microsoft, Syntax Softtech,


How do pass data from one layer to another layer in N-tier architecture?

2 Answers  


How can I configure asp.net applications that are running on a remote machine?

0 Answers  






How do you implement sql caching in asp.net?

0 Answers  


Suppose, I have 3 pages, Page1.aspx, Page2.aspx, Page3.aspx. All pages are in diff. server. When user req. for a page, Page1.aspx opens Ist & a session established. If user req. for IIn page, second session established. Similarly, 3rd session established if user req. 3rd page. In this scenario, tot. 03 sessions are established. How we can minimize it so that it will work with only one session?

3 Answers   TCS, Wipro,


What is hidden field in asp.net?

0 Answers  


Why asp.net mvc is better than asp.net? : Asp.Net MVC

0 Answers  


what are the attributes of sitemapnode?

3 Answers   Satyam,


What are the features of asp net?

0 Answers  


What is the use of express session?

0 Answers  


Categories