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 session variables?

2 Answers   Microsoft,


Is it possible to perform data validations in the database?

1 Answers   Quest,


Why do we need asp.net?

0 Answers  


Define page fragment caching?

0 Answers  


How does asp page work?

0 Answers  






Hi please tell me what is ISNOTPOSTBACK,POSTBACK,AUTOPOSTBACK and also the extensions of aspx,asmx,ascx its urgent plz reply me soon....

6 Answers   Logica CMG,


AJAX - explain the concept and some controls like update panel, tabcontrol etc

2 Answers   Syntel,


what cut off mark for po's,what questions they asked for interview?

0 Answers  


To bind columns manually which tags do you need to add within the asp:datagrid ?

0 Answers   Siebel,


What is the difference between session and viewstate in asp.net?

0 Answers  


What are the type of session in Asp.Net

3 Answers  


How can I configure asp.net applications that are running on a remote machine?

0 Answers  


Categories