文本在Web服务器上创建文件 [英] text File Creation on web-server

查看:92
本文介绍了文本在Web服务器上创建文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是asp.net的新手。



我正在使用asp.net和c#开发一个web应用程序。我希望在.txt文件中将一些数据导出到本地主机。



任何人都知道Web服务器上的文件处理。

解决方案

您可以在虚拟文件夹中物理创建一个文件夹,并使用Server.MapPath(文件的相对路径)保存到该位置。



对于上传文件,您在ASP.Net中有一些控件。通过这个链接。它将帮助您实现这一目标。



http ://www.tutorialspoint.com/asp.net/asp.net_file_uploading.htm

I am new to asp.net.

I am developing a web-application using asp.net and c#. In that I want to export some data to local host machine in ".txt" file.

Any one knows file handling on web server.

解决方案

You can create a folder physically inside your virtual folder and save to that location using Server.MapPath(relative path of your file).

For uploading a file you have some controls in ASP.Net. go through this link. It will help you achieve this.

http://www.tutorialspoint.com/asp.net/asp.net_file_uploading.htm


这篇关于文本在Web服务器上创建文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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