| | |
Generate file in memory to save to local disk
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2005
Posts: 2
Reputation:
Solved Threads: 0
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
TIA
Russ
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
That would violate the browser security model. Browsers are not supposed to author files on a user's system.
The exception that has been provided is the cookie mechanism.
Even if you use StringBuilder to build a "file"... what are you going to do with it? You have to render something to the Response stream. I would suggest you write it into a DIV. Let the user select it and save it if they wish.
The exception that has been provided is the cookie mechanism.
Even if you use StringBuilder to build a "file"... what are you going to do with it? You have to render something to the Response stream. I would suggest you write it into a DIV. Let the user select it and save it if they wish.
![]() |
Similar Threads
- save ram file to hard disk,how? (Graphics and Multimedia)
- memory management in wndows 2000 (Windows NT / 2000 / XP)
- Make Sure Downloaded Files Are Easy to Find Later (Windows tips 'n' tweaks)
- Downloading a File from Server using JavaScript (JavaScript / DHTML / AJAX)
- MS Word - Win2000 SP4 - Floppy locking up (Windows NT / 2000 / XP)
- another newbie with alot of redhat and apache server Q'S (Linux Servers and Apache)
- IE6 (file/save as) does not save pages correctly on my local disk (Web Browsers)
Other Threads in the ASP.NET Forum
- Previous Thread: only functions when focused in the first column
- Next Thread: adding asp.net sections to a web page
| Thread Tools | Search this Thread |
.net 3.5 ajax alltypeofvideos appliances asp asp.net bc30451 beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions control countryselector dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol expose fileuploader fill findcontrol flash formatdecimal formview gridview gudi iis javascript list listbox login microsoft mouse mssql nameisnotdeclared news novell numerical opera panelmasterpagebuttoncontrols problem radio redirect registration relationaldatabases reportemail save schoolproject search security sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos vista visualstudio vs2008 web webapplications webdevelopemnt webdevelopment webprogramming webservice wizard xsl youareanotmemberofthedebuggerusers






