[英]Have ASP.NET C# web form access multiple files on computer
I have a file, call it main.dat
. 我有一个文件,称为
main.dat
。 Inside it has lines like include file-a.dat
, include file-b.dat
and I have logic that handles these inputs. 它的内部有诸如
include file-a.dat
, include file-b.dat
而我有处理这些输入的逻辑。 I would like to be able to upload main.dat
via asp.net (C#) web forms project, and have IT access file-a.dat
which should be in the same folder. 我希望能够通过asp.net(C#)Web窗体项目上载
main.dat
,并具有IT访问file-a.dat
,该file-a.dat
应位于同一文件夹中。 If I use something like silverlight-multifile-uploader, then it takes all of them (in alphabetical order) and reads them in one by one, in which I cannot control the order, which I want to be in the same order as the includes are in main.dat
. 如果我使用诸如silverlight-multifile-uploader之类的东西,则将它们全部(按字母顺序)并逐一读取,而我无法控制该顺序,而我希望该顺序与包括在
main.dat
。
main.dat
and have my code access the specified files? main.dat
并让我的代码访问指定的文件? (I know this is a long shot since this could cause SO many security issues) and if not, file-b.dat
needs something in file-d.dat
and file-d.dat
was in fact included, then make that one the first one read? file-b.dat
需要在file-d.dat
中包含某些内容,并且实际上包含了file-d.dat
,那么将其作为第一个读取的内容吗? How big are the files? 文件有多大? Can you afford uploading them all, even the ones which wont be referenced in the end?
您能负担得起全部上传的费用,甚至最后都不会引用的内容吗?
If they are small, you can save them to Dictionairy<string,MemoryStream>
and sort & process them in memory. 如果它们很小,则可以将它们保存到
Dictionairy<string,MemoryStream>
并在内存中对它们进行排序和处理。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.