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
Is a dll file an executable?
Explain the procedure to handle the process request using mhpm events fired? : asp.net mvc
What is difference between viewstate and session in asp net?
What is a pixel url?
where can i gather the materials for MCP certification
Do you know caching feature?
What is the advantage of mvc over asp.net? : Asp.Net MVC
Explain how can we access static variable?
How do we access view state value of this page in the next page?
What is the used of "ispostback" property?
Can you change a master page dynamically at runtime? How?
What is global.asax file used for?
What role “#&&” plays in a querysting?
When was asp.net released?
Are xaml file compiled or built on runtime?