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
Explain different types of validators in asp.net?
What are web server controls in asp.net?
How to use push notification?
How to disable validator control by client side JavaScript?
Do cookies store passwords?
What are Caching techniques in .NET
Explain Apache web servers ? How can you get ASP.NET running in Apache web servers - why should you do this?
For which does this Codebehind="MyCode.aspx.cs" is relevent to ?
What is difference between web config and global asax?
What is master page in dtp?
What is the difference between page.registerclientscriptblock and page.registerstartupscript?
What is the difference between WindowsDefaultLocation and WindowsDefaultBounds?
What are the ways to show data grid inside a data grid for a master details type of tables? If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?
What are the different types of Caching techniques in ASP.NET?
Is there any property names “isnavigating”?