November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
Try with:
var file = HostingEnvironment.VirtualPathProvider.GetFile(p) as UnifiedFile; if (file != null) { size = file.Length; }
Hope this helps.
I pass the the virtual path, but got exception of null refrence. I can get the extention by using VirtualPathUtility.GetExtension(p). I need to get the file size.
eg.
string size=string.Empty;
string extentionIcon=string.Empty;
System.IO.Stream file = VirtualPathMappedProvider.OpenFile(p);
if(file!=null)
size = GetFileSizeString(file.Length);
extentionIcon = GetFileIcon(VirtualPathUtility.GetExtension(p));