What is the difference between appsetting and connectionstring
tags in web.config file

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is asp.net mvc? : asp.net mvc

646


What are the event handlers that we can have in global.asax file?

597


Just by seeing the signature of the bean how can you specify whether it is a stateful or stateless session bean?

631


Can you explain why it is useful to use mvc instead of webforms? : asp.net mvc

643


List all templates of the repeater control.

654






Why session is used in asp.net?

619


what is AutoEventWireUp and what is the use of This property explain in details?

1222


Why is xap important?

693


What will happen if the server confugration file and the application confugration file have different values for sassion state ASP.NET?

859


what are the events raised in asp.net page life cycle?in which stage view state can be loaded?

650


How to turn off cookies for a page?

669


What is custom events? How to create it?

716


Can we have 2 web config files?

620


What is session in http request?

664


Who creates jsessionid?

678