RussI need help writing a method to create a simple text file. I want that fileto be saved to a local drive (client side of my asp.net app). The filenamewill always be the same "license.txt" but the content will be different foreach user. I don''t really want to create the file on my server and them havethem downloaded it. I would much rather use a stringbuilder and the save thecontents of the stringbuilder to the users local drive (propted of course).TIARuss推荐答案 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.NETThe classic download/upload example: http://www.ondotnet.com/pub/a/dotnet...04/01/asp.htmlInstead of WriteFile, just Write the builder.ToString()--Craig DeelsnyderMicrosoft MVP - ASP/ASP.NET如果这是为了引发保存文件提示,请尝试: http://support.microsoft。 com / kb / 260519 / zh-CN 否则请告诉我们您需要帮助的确切位置... 当然,一旦文件被保存,你将无法访问它(不要真的知道它是否有用然后......) 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-usElse 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''treally know if it will be usefull then...)Patrice--"Russ Green" <rg*******@spam-stubbsrich.com> a écrit dans le message denews: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 thatfile 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 differentfor each user. I don''t really want to create the file on my server and themhave them downloaded it. I would much rather use a stringbuilder and the savethe contents of the stringbuilder to the users local drive (propted ofcourse). TIA Russ Russ, 你不能用普通的ASPNET在用户端写一个简单的文件 安全设置。 但是你可以在cookie上添加信息,这些信息通常是(在非 cookieless模式下)设置的客户电脑。你也可以重读它。 (别忘了设定过期日期。 我希望这会有所帮助, CorRuss,You can not write even a simple file on the userside with ASPNET with normalsecurity settings.However you can add information to the cookies which are normally (in noncookieless 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创建文件客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!