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 enableviewstate in asp net?

0 Answers  


How do you retrieve information from web.config ?

5 Answers   MMTS,


what is command line compiler.what are the steps and how it is related to debugging.

0 Answers  


What is an application domain ?

2 Answers   Microsoft,


Describe the disadvantage of cookies.

0 Answers  






How could you modify xaml content from javascript?

0 Answers  


What are skins?

1 Answers  


What is asp.net master page?

0 Answers  


What are directives in asp.net?

0 Answers  


what is view stat how it is use ?

2 Answers   Amazon,


There is a login page that has two text boxes with required field validators on it. The page has a login and cancel button. How can we ensure that the click on the cancel button doesnt fire a validation event.

2 Answers   Proteans,


What is asp.net version?

0 Answers  


Categories