如何在客户端读取文本文件? [英] how to read a text file at client side?

查看:120
本文介绍了如何在客户端读取文本文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用程序驻留在服务器和客户端从他自己的系统(Web应用程序)访问的位置.当用户选择文本文件时,我想读取文本文件并发送到服务器端.

application resides at server and client accessing from his own system (web application). when the user selects a text file then I wanna read text file and send to server side.

推荐答案

只要考虑从Web应用程序访问客户端文件有多危险.对不起,你做不到.

另一方面,您可以使用ActiveX来实现所需的功能,但这完全是另一回事.
Just think how dangerous it would be to access clients files from web application. Sorry mate you can not do it.

On the other hand you could use ActiveX, to implement what you want, but that is totally different story.


您可以为他们提供一个上载控件,让他们明确选择将文件发送给您.正如Yusuf所说,如果用户愿意信任您并安装Active X控件,那可能会起作用,但否则,您需要一个上载控件.如果您不了解上传控件,则表明您需要阅读ASP.NET上的基础书籍.
You can give them an upload control where they specifically choose to send you the file. As Yusuf said, if the user is willing to trust you and install an Active X control, that might work, but otherwise, an upload control is what you want. If you didn''t know about the upload control, that''s a good sign that you need to read a basic book on ASP.NET.


您可以使用Activx对象来阅读该控件.客户端中的文本文件
you can use Activx object to read the text file in client side


这篇关于如何在客户端读取文本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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