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 are different templates available in Repeater,DataList and Datagrid ?

1 Answers  


What is the Difference between Web.config and global.asax? Can we write connection String code in global.asax?

10 Answers   Microsystems,


what are configuration files?

0 Answers  


What is query string with example?

0 Answers  


What is a session in programming?

0 Answers  






Whats an assembly

2 Answers   IBM,


What is a Windows Service and how does its lifecycle differ from a "standard" EXE?

2 Answers  


How do I know asp.net mvc version? : Asp.Net MVC

0 Answers  


What is interval time of GC in .net

2 Answers  


What is the difference between application state and caching?

0 Answers  


What kind of data we can store in viewstate?

0 Answers  


Explain Authentication mechanism in dotnet

0 Answers   BirlaSoft,


Categories