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
How many types of sessions in asp.net?
What is event in asp.net?
Explain Apache web servers ? How can you get ASP.NET running in Apache web servers - why should you do this?
What is skin in asp.net?
What is session object? Describe in detail.
What is asp.net response object?
How you can return View from ASP.NET Web API method?
Where is session cookies stored?
Describe the events in the life cycle of a web application.
What are the main requirements for caching?
Explain the difference between the web config and machine config.
What is a 404 redirect?
Can you explain the importance of finalize method in .net?
What is the concepts of globalization and localization in .net?
Explain how can we inherit a static member?