How to Return A File and a strongly Typed data at the same time?

Posted by chobo2 on Stack Overflow See other posts from Stack Overflow or by chobo2
Published on 2010-05-04T20:42:04Z Indexed on 2010/05/04 20:48 UTC
Read the original article Hit count: 186

Filed under:
|
|
|

Hi

I am using asp.net mvc 1.0 and I want to return a XML file but I also want to return a strongly typed data back so I can update some fields.

Like the XML file will contain users who failed to be inserted into the database. So I want that to appear as a dialog save box what asp.net mvc return file() would do.

However I also want to return on the page like values like how many users failed to be added, how many users where added, etc.

So I want to use scafolding with the class file I want to pass it along. If this was a view I could pass it along as an object model but I don't see a parameter for that in File().

I also don't want to save the xml file onto the harddrive I want to do it through memory. So have a link that would display on the page to download the file and show the the data I want would not be desired.

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about c#