我想在单击按钮时浏览到文件夹并选择该文件夹中的文件。当用户选择特定文件时。我想检索该文件的文件夹路径和大小?
我怎样才能用c#在asp.net中做到这一点
顺便说一句,我使用的是 vs2008。
请帮助我
感谢期待
最佳答案
为什么不使用 FileUpload 控件而不是 Button? http://asp.net-tutorials.com/controls/file-upload-control/
Using FileUpload control, it will accept file uploads from users and is extremely easy. With the FileUpload control, it can be done with a small amount of lines of code, as you will see in the following example. However, please notice that there are security concerns to to consider when accepting files from users!
关于c# - 在 asp.net 中单击按钮浏览到文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5848214/