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

hi everyone. can anyone send me wipro interview questions on .net. plz its urgent

1 Answers   Wipro,


To display data in the combo box, prior to setting the Data Source, what kind of property on a Combo Box do you set with a column name?

0 Answers   Siebel,


How to use multiple scriptmanager controls in a web page?

0 Answers  


About dataset and data mining ?

1 Answers   Cognizant,


Explain the difference between mvc (model-view-controller) and mvp (model-view-presenter)? : asp.net mvc

0 Answers  






How many types of sessions are there in asp net?

0 Answers  


What command line used to generate Runtime callable wrapper.

2 Answers   CTS,


Can session variables be accessed from code-behind?

2 Answers   Microsoft, RMS,


What is viewstate? In which event of the page life cycle, is the viewstate available?

0 Answers  


is it possible to set more than web.config file for an ASP.net APPLICATION?can it run?how is it possible

3 Answers  


What is a uri query?

0 Answers  


Explain asp.net page life cycle?

0 Answers  


Categories