What is the Difference between Web.config and global.asax?
Can we write connection String code in global.asax?
Answer Posted / dasharatham
sorry to the above answer which is applicable to ASP.NET
application folders..
web.config is which is used for settings to an application
in future requirement.
Global.asax which is handling application level events and
session level events..
I expected we can place the connection string like this
void Session_Start(object sender, EventArgs e)
{
Application["sqldb"] = ConfigurationManager.AppSettings
["constr"].ToString();
}
| Is This Answer Correct ? | 7 Yes | 7 No |
Post New Answer View All Answers
What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
Explain the concept of View Model in MVC?
Explain the difference between inline and code behind - which is best in?
What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?
Which library is used by the testers and developers to develop automated tests and create testing tools?
What are the components of ado.net?
Explain Areas in MVC?
When we use cookie less session? Explain its working?
Define the term Scavenging in Caching?
What is the full meaning of asp.net?
Name the tools or API for developing or testing web api?
What are web server controls in asp.net?
What is globalization and localization in asp net?
What is web configuration file and how to use in web application
What is a reflection?