在c#.net Web表单中附加单词文件的引用名称或代码 [英] reference name or code to attach word file in c#.net Web forms

查看:82
本文介绍了在c#.net Web表单中附加单词文件的引用名称或代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在C#.net中有一个Web表单,我想附加一个字文件而不使用html的文件对话框控制.我已经在窗口中使用OpenFileDialog类做到了这一点,但是我在C#Web表单中使用了同一个类,但没有这样做.''没事.
我必须使用哪个类或该类的代码是什么.
请帮帮我.
在此先感谢

Hi,
I have a web form in C#.net and i want to to attach a word file without using filedialog control of html.I already done it that in window from using OpenFileDialog class but i am using same class in c# web form it didn''t work.
Which class i''ll have to use or what is the code for that.
Please help me for that.
Thanks in advance

推荐答案

此问题表明对ASP.NET的工作方式有深刻的误解.在询问我必须使用哪个类,或者它的代码是什么"之前,您应该理解为什么尝试的方法不起作用. OpenClassDialog会做什么?该对话框显示本地系统(即服务器)上的文件.您是否需要让使用者在服务器文件系统上选择一个文件?这将是完全不安全的,并且没有任何意义.您是否需要客户端计算机上的文件?它是通过HTML <input type="file">完成的,但是如果您不了解HTTP,HTTP服务器和ASP.NET的功能,那么没有代码可以帮助您.我不知道你在这里想念什么.可能几乎所有内容.

—SA
This question shows deep misunderstanding of how ASP.NET works. You should understand why what you tried did not work before asking "Which class i''ll have to use or what is the code for that". What would OpenClassDialog do? The dialog presents files on local system, which is the server. Do you need to let the used select a file on server files system? This would be totally unsafe and would not make any sense. Do you need the file on the client machine? It is done via HTML <input type="file">, but no code will help you if you don''t understand what HTTP, HTTP server and ASP.NET do. I do not know what are you missing here. Probably, pretty much everything.

—SA


这篇关于在c#.net Web表单中附加单词文件的引用名称或代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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