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 difference between dataset and datareader?
What is session and cookies in asp.net?
Explain the difference between dataset and datareader.
What is a Cookie? Where is it used in ASP.NET?
What is the recommended approach for asp.net mvc to globally intercept exceptions? What other functionality can be implemented with the approach? : Asp.Net MVC
Error : The operation couldn’t be performed because ole db provider sqlncli10 for linked server was unable to begin a distributed transaction.00000110 oledb provider for linked server returned message the partner transaction manager has disabled its support for remote/network transactions. I can able to execute the stored procedure in sql server but when i run the web page getting error like above. I did all the configuration. what is the solution?
What do you understand by aggregate dependency?
What is the difference between typeof() vs gettype()?
Tell me how asp.net mvc differs from asp.net web forms? : asp.net mvc
What is a proxy in web service?
List the types of authentication supported by asp.net?
Is post back property in asp net?
Out of ASP or ASP.NET which one is stateless?
What is asp net objects?
What is difference between session and viewstate?