internal class DocSharingSessionFacade
{
private static DocSharingSessionFacade sessionFacade = null;
private static readonly string _pointInTimeUploadFileKey = "DocSharingUploadFile";
private DocSharingSessionFacade()
{
}
public static DocSharingSessionFacade Instance()
{
if (sessionFacade == null)
{
sessionFacade = new DocSharingSessionFacade();
}
return sessionFacade;
}
#region UploadFile Methods
public string UploadFile
{
get { return HttpContext.Current.Session[_pointInTimeUploadFileKey] as string; }
set {HttpContext.Current.Session[_pointInTimeUploadFileKey] = value; }
}
public void ClearUploadFile()
{
HttpContext.Current.Session.Remove(_pointInTimeUploadFileKey);
}
#endregion
}
BTW - the reason I am using Session instead of ViewState for this type of variable is that we are using MonoRail and NVelocity so do not actually have a ViewState object.
No comments:
Post a Comment