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
What are the namespace classes used in asp.net mvc? : asp.net mvc
What is a web based system?
What are the different authentication modes in asp.net?
What is the difference between asp.net mvc and asp.net webforms? : asp.net mvc
Hi All, Im an MCA holder with 3+ years of experience in asp.net. Now i want to move to some good government job. I have no idea about different categories of exams held & which one can be applicable for my education background. I have done B.A with MCA. Please help me out with your valuable suggestions. I would be very grateful. Thanks Anuj
Why we go for mvc instead of asp.net? : Asp.Net MVC
Is viewstate enabled by default?
Can you dynamically assign a Master Page?
What is the use of the tag in the web.config file?
Can the validation occurs in server-side or client-side? If the validation occurs why should we do?
What is custom attribute? How to create?
What are the file extensions for razor views?
Explain server control extensibility with reference to asp.net 2.0 ?
What is custom attribute?
What is the differences between a primary key and a unique key in sql server?