How to retrieve value of Application[]?

goodmorningsky

Centurion
Joined
Aug 18, 2003
Messages
172
Hi, all.
I saved the value,path to my upload file location to Application bag to use this value globally.
But, I don't know how to retrieve from WebForm.
object val = Application["UploadDir"]; doesn't work!
how can I retrieve it?
Code:
in global.asax
protected void Application_Start(Object sender, EventArgs e)
{
	Application["UploadDir"] = Server.MapPath(".\\") + "uploadFiles";
}
 
Back
Top