从客户端而不是服务器读取文件 [英] Reading file from Client instead of Server

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

问题描述

您好,


是否可以从客户端读取CSV,并将我的Datagrid绑定到CSV文件中的

数据,而无需上传首先将文件发送到服务器?


我在我的工作站上尝试过并在调试模式下工作正常,但是当我在我们的DEV服务器上发布页面时来自

客户端的CSV文件并不好。


有没有人以前做过这个?如果是这样,我该怎么办?我是ASP.net的新手所以

如果你有一些示例代码我可以看看会很棒。


谢谢,

Hello,

Is it possible to read a CSV from the Client, and bind my Datagrid to the
data in the CSV file without uploading the file to the Server first?

I have tried and in Debug mode on my workstation it works fine, but when I
publish the page on our DEV server it doesn''t fine the CSV file from the
client.

Has anyone done this before? If so, how do I do it? I''m new to ASP.net so
if you have some sample code I can look at that would be great.

Thanks,

推荐答案

我不认为这是可能的。唯一可以在客户端进行的处理是通过Javascript和Javascript无法从文件中读取。


为什么要尝试完成所有这些客户?


Jeff

SAL写道:
I dont think this is possible. The only processing that can be done on
the client is through Javascript and Javascript cannot read from files.

Why are you trying to accomplish all of this on the client?

Jeff
SAL wrote:

您好,


是否可以从客户端读取CSV,并将我的Datagrid绑定到CSV文件中的

数据,而无需先将文件上传到服务器?


我已经尝试过并且在我的工作站上的调试模式下工作正常,但是当我在我们的DEV服务器上发布页面时,它不是很好的CSV文件

客户。


有没有人这样做过?如果是这样,我该怎么办?我是ASP.net的新手所以

如果你有一些示例代码,我可以看看会很棒。


谢谢,
Hello,

Is it possible to read a CSV from the Client, and bind my Datagrid to the
data in the CSV file without uploading the file to the Server first?

I have tried and in Debug mode on my workstation it works fine, but when I
publish the page on our DEV server it doesn''t fine the CSV file from the
client.

Has anyone done this before? If so, how do I do it? I''m new to ASP.net so
if you have some sample code I can look at that would be great.

Thanks,


如果您使用WSH(Windows

脚本主机),您可以在客户端的文件系统上找到一个文件。您需要在每个客户端上设置特殊安全性

浏览器。


Asp.Net数据绑定是纯服务器端功能。你不能在

客户端上做。


-

Eliyahu Goldin,

软件开发人员&顾问

Microsoft MVP [ASP.NET]

" SAL" < SA*@discussions.microsoft.com写信息

news:31 *************************** ******* @ microsof t.com ...
You can find a file on the client''s file system if you use WSH (Windows
Scripting Host). You would need to set special security on each client
browser.

Asp.Net databinding is a pure server-side functionality. You can''t do it on
client.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"SAL" <SA*@discussions.microsoft.comwrote in message
news:31**********************************@microsof t.com...

您好,


是否可以阅读来自客户端的CSV,并将我的Datagrid绑定到CSV文件中的

数据,而不先将文件上传到服务器?


我试过了在我的工作站上的调试模式下,它工作正常,但是当我在我们的DEV服务器上发布页面时,它不是来自

客户端的CSV文件。


有没有人这样做过?如果是这样,我该怎么办?我是ASP.net的新手

所以

如果你有一些示例代码,我可以看一下就好了。


谢谢,
Hello,

Is it possible to read a CSV from the Client, and bind my Datagrid to the
data in the CSV file without uploading the file to the Server first?

I have tried and in Debug mode on my workstation it works fine, but when I
publish the page on our DEV server it doesn''t fine the CSV file from the
client.

Has anyone done this before? If so, how do I do it? I''m new to ASP.net
so
if you have some sample code I can look at that would be great.

Thanks,



因为我想允许用户对数据进行编辑,如果他们必须
$在将数据保存到SQL Server数据库之前b $ b。


" Jeff"写道:
Because I want to allow the user to make edits to the data if they have to
before I save the data to a SQL Server DB.

"Jeff" wrote:

我不认为这是可能的。唯一可以在客户端进行的处理是通过Javascript和Javascript无法从文件中读取。


为什么要尝试完成所有这些客户?


Jeff


SAL写道:
I dont think this is possible. The only processing that can be done on
the client is through Javascript and Javascript cannot read from files.

Why are you trying to accomplish all of this on the client?

Jeff
SAL wrote:

你好,


是否可以从客户端读取CSV,并将我的Datagrid绑定到CSV文件中的

数据,而无需先将文件上传到服务器?


我已经尝试过并且在我的工作站上的调试模式下工作正常,但当我在我们的DEV服务器上发布页面时它不是很好来自

客户端的CSV文件。


有没有人以前做过这个?如果是这样,我该怎么办?我是ASP.net的新手所以

如果你有一些示例代码,我可以看看会很棒。


谢谢,
Hello,

Is it possible to read a CSV from the Client, and bind my Datagrid to the
data in the CSV file without uploading the file to the Server first?

I have tried and in Debug mode on my workstation it works fine, but when I
publish the page on our DEV server it doesn''t fine the CSV file from the
client.

Has anyone done this before? If so, how do I do it? I''m new to ASP.net so
if you have some sample code I can look at that would be great.

Thanks,



这篇关于从客户端而不是服务器读取文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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