| | |
Generate file in memory to save to local disk
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
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 activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net browser c# c#gridviewcolumn cac checkbox class commonfunctions compatible confirmationcodegeneration content countryselector courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox microsoft mono mouse mssql multistepregistration news novell objects opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail rotatepage schoolproject security sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio vs2008 web webapplications webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers






