Showing posts with label downloading file. Show all posts
Showing posts with label downloading file. Show all posts
Thursday, April 15, 2010
One-click download for text file on HTML
To create a one-click download link on a webpage, for a text file that is basically a 'csv' or comma separated values file, put the '*.csv' extension.
Friday, June 12, 2009
User download a file ASP.NET MVC with AJAX
I wanted the user to be able to download a file, using ASP.NET MVC with AJAX. The problem wasn't downloading, or AJAX. It was the two together.
It's really simple. What you need to do is get the path of the file to download, put the value in ViewData and make an href to that file with value "Download" to target="_blank". This will show a popup to download the file.
[lt]a href='[lt]%=path%[gt]' target="_blank" [gt] Download [lt]/a[gt]
[lt] = "<"
[gt] = ">"
Subscribe to:
Posts (Atom)