使用VB.NET和ASP.NET创建文件客户端 [英] Create file client side with VB.NET and ASP.NET

查看:79
本文介绍了使用VB.NET和ASP.NET创建文件客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助编写一个方法来创建一个简单的文本文件。我希望将该文件

保存到本地驱动器(我的asp.net应用程序的客户端)。文件名

将始终是相同的license.txt。但每个用户的内容将有所不同

。我真的不想在我的服务器上创建文件,他们已经下载了它们。我宁愿使用stringbuilder并将stringbuilder的

内容保存到用户本地驱动器(当然是建议的)。


TIA

Russ

I need help writing a method to create a simple text file. I want that file
to be saved to a local drive (client side of my asp.net app). The filename
will always be the same "license.txt" but the content will be different for
each user. I don''t really want to create the file on my server and them have
them downloaded it. I would much rather use a stringbuilder and the save the
contents of the stringbuilder to the users local drive (propted of course).

TIA

Russ

推荐答案

Russ Green写道:
Russ Green wrote:
我需要帮助编写方法创建一个简单的文本文件。我希望将该文件保存到本地驱动器(我的asp.net应用程序的客户端)。文件名
将始终是相同的license.txt。但每个用户的内容会有所不同。我真的不想在我的服务器上创建文件,他们已经下载了它。我宁愿使用stringbuilder并将stringbuilder的内容保存到用户的本地驱动器(当然是建议的)。

TIA

Russ
I need help writing a method to create a simple text file. I want that file
to be saved to a local drive (client side of my asp.net app). The filename
will always be the same "license.txt" but the content will be different for
each user. I don''t really want to create the file on my server and them have
them downloaded it. I would much rather use a stringbuilder and the save the
contents of the stringbuilder to the users local drive (propted of course).

TIA

Russ




经典下载/上传示例:

http://www.ondotnet.com/pub/a/dotnet...04/01/asp.html


而不是WriteFile,只需编写builder.ToString()


-

Craig Deelsnyder

Microsoft MVP - ASP / ASP.NET



The classic download/upload example:

http://www.ondotnet.com/pub/a/dotnet...04/01/asp.html

Instead of WriteFile, just Write the builder.ToString()

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


如果这是为了引发保存文件提示,请尝试:
http://support.microsoft。 com / kb / 260519 / zh-CN


否则请告诉我们您需要帮助的确切位置...


当然,一旦文件被保存,你将无法访问它(不要
真的知道它是否有用然后......)
< br $>
Patrice


-


" Russ Green" < RG ******* @ spam-stubbsrich.com>一个écritdansle message de

新闻:O3 **************** @ TK2MSFTNGP09.phx.gbl ...
If this is to raise the "save file" prompt, try :
http://support.microsoft.com/kb/260519/en-us

Else tell use what is the exact point on which you need help...

Of course once the file is saved you won''t be able to access it (don''t
really know if it will be usefull then...)

Patrice

--

"Russ Green" <rg*******@spam-stubbsrich.com> a écrit dans le message de
news:O3****************@TK2MSFTNGP09.phx.gbl...
我需要帮助编写一个方法来创建一个简单的文本文件。我希望将
文件保存到本地驱动器(我的asp.net应用程序的客户端)。文件名
将始终是相同的license.txt。但每个用户的内容将不同
。我真的不想在我的服务器上创建文件,而他们只需要下载它就可以获得
。我宁愿使用stringbuilder并将string $ b的内容保存到用户本地驱动器(以b $ b课程为主)。
TIA

Russ
I need help writing a method to create a simple text file. I want that file to be saved to a local drive (client side of my asp.net app). The filename
will always be the same "license.txt" but the content will be different for each user. I don''t really want to create the file on my server and them have them downloaded it. I would much rather use a stringbuilder and the save the contents of the stringbuilder to the users local drive (propted of course).
TIA

Russ



Russ,


你不能用普通的ASPNET在用户端写一个简单的文件

安全设置。


但是你可以在cookie上添加信息,这些信息通常是(在非
cookieless模式下)设置的客户电脑。你也可以重读它。

(别忘了设定过期日期。


我希望这会有所帮助,


Cor
Russ,

You can not write even a simple file on the userside with ASPNET with normal
security settings.

However you can add information to the cookies which are normally (in non
cookieless mode) set on the clients computer. You can reread that as well.
(don''t forget to set the expire date.

I hope this helps,

Cor


这篇关于使用VB.NET和ASP.NET创建文件客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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