Peddyidioke
New Member
I'm using MVC 3. I've created a csv file in an Action Method on the server (called GetCSV()). It's an [HttpPost] action method. What I'd like to do is send that csv file directly to the web browser as a downloadable file. I got this to work using window.open(), however, that is a GET method by nature and I need something that makes use of POST since I will need to pass a lot of parameters into it. Ideally, I would like to use Ajax since I can easily pass a whole lot of parameters back to the server using this approach. Any ideas in how I can use an Ajax call to pass the parameters to the server and then somehow have the response open as a downloadable file? I'd appreciate any advice!