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 are ASP.NET Web Forms? How is this technology different than what is available though ASP?
Is it possible to change the index of primary key on table?
What's the use of response.output.write()?
Explain model, view and controller represent in an mvc application? : asp.net mvc
What are the contents of cookie?
What is ipostback?
Explain difference betn dataset and recordset?
What is session and cookies in asp.net?
Tell me the code snippet to show how we can return 404 errors from HttpError?
What is the concept of view state in asp.net?
Do you know about caching with the datasource controls?
What is the difference between a page theme and a global theme?
In a page I have gridview with options of select and delete using hyperlink when I am selecting any one of then it has to open another page how can it?
What is autopost?
Difference between DataGid and Girdview? Difference b/w .Net 2.0, 3.0 and 3.5 ? Diff b/w dispose & Finialize Methods?