C# System.IO.FileInfo gets virtual address which has sessions key
Posted
by Anicho
on Stack Overflow
See other posts from Stack Overflow
or by Anicho
Published on 2010-04-19T12:31:51Z
Indexed on
2010/04/19
12:33 UTC
Read the original article
Hit count: 348
Okay so the following line returns null because its path cannot be found:
System.IO.FileInfo fi = di.GetFiles()[position];
What I am currently doing is:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<ctl:Gallery runat="server" ID="Gallery1" FolderUrl="~/images/1/" Size="100" />
When this is invoked System.IO.FileInfo fi = di.GetFiles()[position]; it has the value similar to this:
C:\Users\SomeUsername\Desktop\Tiamo\(S(mr1h0l55ycuixfbtqxbmttek))\images\1
Any idea how I can return the virtual path without actually having the session key in there? Thank you in advanced for any help you may give :) much appreciated.
© Stack Overflow or respective owner