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 can you access the properties and controls of master pages from content pages?
Define static member?
Can you explain the basic use of dataview?
What does aspcompat="true" mean?
What is the use of express session?
What is the main function of url routing system in asp.net mvc? : asp.net mvc
Can you use Web API with ASP.NET Web Form?
Describe in brief .net framework and its components.
Name the method that needs to be invoked on the dataadapter control to fill the generated dataset with data?
Which type of state management is provided by Query String in ASP.NET?
What do you mean by marshalbyref?
Why Unload event of MasterPage Calls first in ASP.net ?
How to implement role based security in asp.net mvc? : Asp.Net MVC
What is connection pooling and how to enable and disable connection pooling?
How does output caching work in ASP.NET?