C# System.IO.FileInfo 获取具有会话密钥的虚拟地址
好的,下面一行返回 null,因为找不到它的路径:
System.IO.FileInfo fi = di.GetFiles()[position];
我当前正在做的是:
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<ctl:Gallery runat="server" ID="Gallery1" FolderUrl="~/images/1/" Size="100" />
当调用 System.IO.FileInfo fi = di.GetFiles()[position]; 时它的值与此类似:
C:\Users\SomeUsername\Desktop\Tiamo\(S(mr1h0l55ycuixfbtqxbmttek))\images\1
知道如何在没有实际会话密钥的情况下返回虚拟路径吗?预先感谢您提供的任何帮助:) 非常感谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我正确理解你的问题,这应该对你有帮助:
If I understand your question correctly, this should help you: