virtual file

You are currently browsing articles tagged virtual file.

Had some trouble loading a vitrual file containing spaces.

The problem was apperently that some characters were urlencoded, a simple Server.UrlDecode(CurrentPage["DocumentPath"]) solved the problem. :)

Tags: , ,

VirtualFile file = System.Web.Hosting.HostingEnvironment.VirtualPathProvider.GetFile( CurrentPage["FilePath"].ToString() );
UnifiedFile f = file as UnifiedFile;
return f.Length / 1024 + " kb";

Tags: , , ,