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 is the use of global.asax file?
Which namespace is used by ado.net?
What is the full form of asp.net?
What are the two properties that are common on every validation control?
What is the base class from which web forms are inherited?
What is loop in asp.net?
Define xmlreader class.
Explain MVC model binders?
What is the function of new view engine in asp.net? : asp.net mvc
What is is post back property in asp net?
benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks
9. Why should we hire you over the others waiting to be interviewed?
Explain the working of passport authentication.
How to do state management in ASP.NET?
What are the ways of preserving data on a Web Form in ASP.NET?