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 ?

Answers were Sorted based on User's Feedback



How do you retrieve information from web.config ?..

Answer / ansu_kumar

generaly we store our connection string in web.config file
under tag
<appsetting>
<add key=connection_string
value="data source=......"/>
</appsetting>
and
for accessing the value
in aspx page we writes
string const=
configurationsetting.appsetting.connection_string

Is This Answer Correct ?    3 Yes 0 No

How do you retrieve information from web.config ?..

Answer / sudhir kunnure

In web.congig you can add key and its value.And that key
value u can retrive like

string connectionString =
System.Configuration.ConfigurationSettings.AppSettings
["conStringWeb"].ToString()

Here conStringWeb is my key and i access its value.

Is This Answer Correct ?    3 Yes 0 No

How do you retrieve information from web.config ?..

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

How do you retrieve information from web.config ?..

Answer / sam

using ConfigurationManager, Configuration classes
Example
ConfigurationManager.ConnectionStrings
["str"].ConnectionString;

Is This Answer Correct ?    0 Yes 0 No

How do you retrieve information from web.config ?..

Answer / vikram

By using Configuration Manager we can get information
<appsetting>
<add key=img
value="data source=......"/>
</appsetting>

we can use appsetting
configurationManager.appsetting["img"]

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What is __ requestverificationtoken?

0 Answers  


How do you store a value in viewstate and retrieve them?

0 Answers  


What is active web page?

0 Answers  


Which method do you use to kill explicitly a users session?

0 Answers   MindCracker,


What is new asp.net core?

0 Answers  


About web methods and its various attributes ?

1 Answers   Digital GlobalSoft,


Mention the namespace that is used to include .net data provider for sql server in .net code?

0 Answers  


What is Web Gardening? How would using it affect a design ?

1 Answers   Infogain,


How can we access static variable?

0 Answers  


What is the concepts of globalization and localization in .net?

0 Answers  


What is the need of client side and server side validation ?

1 Answers   Keane India Ltd,


What is the difference between sealed vs static class?

0 Answers  


Categories