I'm getting started with ASP.NET MVC, but would like to explore further. I've walked through the usual "hello, world" examples, and now I'd like to try something a little more complex. Specifically, I want to be able to:
- upload some XML file,
- do some simple processing on it, and then
- allow the user to download a new file with the results of the processing
In this case, the processing I'd like to do is something trivial that proves that I really got the XML file and have examined it. For example, counting the number of <basket>
elements is sufficient. After I do the processing, I'd like to stream the results as a new file to the user (say, a text file that just contains the sentence "There were 398 <basket>
elements") so that their browser will initiate a download.
What's a good general approach for this?