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

What is the meaning of TestApi?

0 Answers  


What is .Net3.0 and .Net3.5? Describe something about that Features..

1 Answers  


i want to develope a page for online test using asp.net with c#.net. so, how to insert the questions in the database sqlserver2000 and how to pick the questions randomly when user login for test. plz send the code for this....

3 Answers   Chaitanya, Crysalis, CTS, HCL, Sein Infotech, TCS,


Explain cashing in asp.net.

0 Answers  


What is caching? What are the different types of caching?

6 Answers  


What does asp in asp.net stand for?

0 Answers  


Is asp.net free?

0 Answers  


what is Impersonation

3 Answers   Alliance One, Task Informatics,


What is actually returned from server to the browser when a browser requests an .aspx file and the file is displayed?

0 Answers   MindCracker,


What are custom user controls in asp.net?

0 Answers  


What is in a session cookie?

0 Answers  


Which two new properties are added in asp.net 4.0 page class?

0 Answers  


Categories