ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
How do you retrieve information from web.config ?
 Question Submitted By :: Deepa
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How do you retrieve information from web.config ?
Answer
# 1
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 ?    0 Yes 0 No
Ansu_kumar
 
  Re: How do you retrieve information from web.config ?
Answer
# 2
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 ?    2 Yes 0 No
Sudhir Kunnure
 
 
 
  Re: How do you retrieve information from web.config ?
Answer
# 3
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 ?    2 Yes 0 No
Anand
 
  Re: How do you retrieve information from web.config ?
Answer
# 4
using ConfigurationManager, Configuration classes
Example
ConfigurationManager.ConnectionStrings
["str"].ConnectionString;
 
Is This Answer Correct ?    0 Yes 0 No
Sam
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
Can two web application share a session and application variable ? Satyam4
what is an Eventbubbling? DSS3
How does SQL Server session state works Emphasis1
What layout mode is the default when a new Web Form is created? a) GridBagLayout b) GridLayout c) FlowLayout d) FormLayout Syntax-Softtech2
On what object is the transaction in ADO.NET focused on? a) The command object b) The DataSet object c) The Connection object d) The DataAdapter object Syntax-Softtech4
Explain Assemblies?,Difference between Panel and GroupBox?,Differences between ASP and ASP.NET?  1
What Are The Difference Between AutoEventWireup="true" and AutoEventWireup="False" Phoenix-Technologies9
Where can we set the specific variables for a application and Session objects ?  2
What is the Difference B/W Finalize() and Dispose() in .Net? HCL7
What is the roll of JIT in asp.net?  4
How do we make a poperty read only? Microsoft1
Features and disadvantages of dataset ? Microsoft3
What tags do you need to add within the asp:datagrid tags to bind columns manually?  2
difference between caching objects in session objects?  2
What is the difference between a session object and cache object CitiGroup2
Describe the difference between inline and code behind?  2
If Asp Dot Application is stateless what happened? during designing TCS3
what is the challenging situation you faced in your career? HP3
What is difference between machine.config and Web.Config? Accenture3
Types of session management in ASP.NET ? Microsoft2
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com