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 tags do you need to add within the asp:datagrid tags to bind columns manually? How?

510


Explain the difference between globalization and localization techniques

528


How do I debug an asp.net application that was not written with visual studio.net and that does not use code-behind?

548


What is autopostback in asp net?

583


What is tracing? Where is it used?

555






What are the validation controls available in ASP.NET?

540


What are the session variables?

511


How would you implement inheritance using c#?

573


How do you secure your connection string information?

516


How can we inherit a static variable?

537


Can I have a unique key as foreign key?

537


When Cookies are expired in ASP.NET?

571


What is server redirect?

545


Which library is used by the testers and developers to develop automated tests and create testing tools?

538


Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?

619