tags:

views:

27

answers:

1

Hi, I'm still new to web app development, so bear with me if this sounds a little silly.

I have to implement functionality into an ASP.NET MVC2 website so that users can download an .rdp file that is generated after clicking a URL.

The reason they need to be generated is that the user names for the machines are shared, but sometimes change, and the users don't necessarily know what they are.

Generating the file would be fine, but my questions are: a) What's the best way of returning the file from my business layer

b) A push in the right direction as to what I need to implement in my controller in order to be able to handle the request, as well as be able to serve up the generated file.

+1  A: 

Take a look here for an example:

http://stackoverflow.com/questions/730699/asp-net-mvc-how-do-i-code-for-pdf-downloads/1072912#1072912

You'd have an ActionResult inside your Controller that would return a File to the user.

Leniel Macaferi