What is the difference between appsetting and connectionstring
tags in web.config file

Answers were Sorted based on User's Feedback



What is the difference between appsetting and connectionstring tags in web.config file ..

Answer / nishanthini.r

ConnectionString:Instead of defining a connection string
on each page, you write it once it the web.config and can
reference it from all other pages.
AppSetting:Not only for defining connection u can give any
key value and name it...but connectionString is meant only
for defining path.
<appSettings>
<add key="MyKey" value="00989-00657-45678-34267"/>
</appSettings>

<ConectionStrings>
<add name="MyConnection" ConnectionString="Connection path
which u have to privide">
</ConnectionStrings>

Is This Answer Correct ?    31 Yes 4 No

What is the difference between appsetting and connectionstring tags in web.config file ..

Answer / vamsipriya

Difference between appSettings and connectionString is:
AppSettings is meant for any data string that can be
stored while connectionString is meant for storing the
database connection strings only.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

How can we Deploy a website?

2 Answers  


Suppose you want a certain ASP.NET function executed on MouseOver over a certain button. Where do you add an event handler?

1 Answers   Zenith,


How to write unmanaged code and how to identify whether the code is managed /unmanaged?

4 Answers   Accenture,


How much is the pay-for-use service if I chose not to use microsoft-sponsored advertising?

0 Answers  


Is it necessary to create a Windows application or Web application to test a Web service ? Is it must to consume this service?

2 Answers   Siebel,






Explain about ASP.NET?

0 Answers  


What are Session states available and its Uses?

2 Answers   iLogic,


How do you retrieve information from web.config ?

5 Answers   MMTS,


Does the following statement executes successfully: Response.Write(?value of i = ? + i);

4 Answers   TCS,


What are the various types of authentication?

1 Answers  


What are the event handlers that can be included in the Global.asax file?

0 Answers   MindCracker,


Explain server-side scripting?

0 Answers  


Categories