从列表中选择一个csv并打开新表中的csv并显示csv c#的内容 [英] select a csv from a list and open up the csv in new table and display contents of csv c#

查看:94
本文介绍了从列表中选择一个csv并打开新表中的csv并显示csv c#的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有一个允许用户上传csv的页面,上传的文件将显示在列表中。我需要用户能够从列表中单击上载的CSV文件名,并在新窗口中显示csv的内容。



问题:如何发布/获取csv的文件名,然后在新窗口中显示CSV的内容?



非常感谢...

Hello, I have a page that allow users to upload csv and the uploaded files will be displayed in a list. I need users to be able to click on the uploaded CSV filename from the list and display the contents of the csv in a new window.

Question: how do i post/get the filename of the csv and then display the content of the CSV out in a new window?

Many thanks...

推荐答案

一种简单的方法就是只链接到文件。他们会点击它,根据他们的系统设置,他们可能会得到保存或下载文件的提示。



如果你想阅读文件然后使用System.File类,读取CSV中的值并将文本放入网页上的文本框中。



参见http://msdn.microsoft.com/en-us/library/system.io。文件(v = vs.110).aspx [ ^ ]
One easy way is to just hyperlink to the file. They'll click on it and depending on their system settings they will likely get a prompt to save or download the file.

If you want to read in the file then use the System.File class, read in the values from the CSV and put the text into a textbox on a web page.

See http://msdn.microsoft.com/en-us/library/system.io.file(v=vs.110).aspx[^]


这篇关于从列表中选择一个csv并打开新表中的csv并显示csv c#的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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