Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How do you retrieve information from web.config ?

Answer Posted / anand

we use as
<appsetting>
<add name="connection" connectionString="Data
Source=...;Initial Catalog=database_name;User
ID=..;Password=.."/>
</appsetting>
and in page
string strConnString =
ConfigurationManager.ConnectionStrings["connection"].ConnectionString.ToString();

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List some of the important session state modes of asp.net.

973


Explain authorization levels in .net ?

1029


What are web beacons used for?

999


What is a pixel url?

918


Explain the difference between the web config and machine config.

1015


What are directives in asp.net?

940


Is there any alternative to avoid name collisions other then Namespaces?

1106


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

1071


What is the state management in asp.net?

1005


Can master pages be nested?

914


What is asp.net architecture?

984


What's the use of formatters in .net?

1017


What is the exact purpose of http handlers?

998


What is data grid view in asp.net?

940


When should I use server transfer and response redirect?

969