访问文件夹项目 [英] Access the folder Items

查看:104
本文介绍了访问文件夹项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我创建了一个文件夹(通过Rclick添加-> new文件夹)并添加了一些项目(文件为* .pdf:〜)
在其中,但是如何在我的表单代码后面访问该文件夹项目?
我在form1.cs中只有此选项

In my project I created a folder(by Rclick add ->new folder) and added some items(files are *.pdf :~ )
in it ,but How can I access that folder items in my form code behind ??
I have only this options in form1.cs

winformapp.|properties
           |Form1
           |program

推荐答案

您之前应该提出更好的要求.

您添加了哪种文件?
You should have asked better before.

What kind of files have you added?


令人惊讶的是,仅进行3次编辑即可了解您的要求.

无论如何,这并不是真正的方法.
将它们添加到项目文件夹中完全没有用,因为您无法以这种方式处理它们.
现在,这取决于您与这些pdf的关系.如果只需要对它们进行二进制处理,则可以使用流等;如果需要以pdf格式打开它们,则需要一个第三方库,因为C#和标准.NET不提供该功能.
Amazing, 3 edit only to understand what you were asking for.

Anyway this is not really the way to go.
Its completely useless to add them into a project folder, because you cant handle them that way.
Now It depends on what you have to do with those pdf. If you have to just binary work on them you can use a stream etc, if you need to open them as pdf you need a 3rd party library because C# and standard .NET does not provide that functionality.


使用此代码

src = ../FolderName/filename.pdf

或Server.mapPath("FolderName//")+ filenam.pdf
use this code

src=../FolderName/filename.pdf

or Server.mapPath("FolderName//")+filenam.pdf


这篇关于访问文件夹项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆