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

How can you register a custom server control to a web page?

0 Answers  


What is the sequence of operation takes place when a page is loaded ?

1 Answers  


How can we update records in gridview?Is there any appropriate code for it?

0 Answers  


What is mta?

0 Answers  


what is an Eventbubbling?

3 Answers   DSS,


repeater and gridview diff? Why is repeater fast than gridview?

3 Answers   TCS,


What is the main function of url routing system in asp.net mvc? : asp.net mvc

0 Answers  


How tooltip is set through code-behind in ASP.NET?

0 Answers  


Is asp net front end or backend?

0 Answers  


I have one application, one user purchase some products in my application? and another person came he is also purchase some products?how can we identify which user purchase which items? my answer is by using session id? but i dont know how? can u give me programming for that?

1 Answers  


When we use cookie less session? Explain its working?

0 Answers   Sans Pareil IT Services,


What is the sequence in which ASP.NET events are processed?

0 Answers  


Categories