0

I have to generate a XML file which have details about its particular table row from a button, and will prompt a Save As dialog to User to sve the file.

I am a beginner in MVC and ASP.Net, but with the help of many blogs or examples available, I was able to create below things but I'm getting many build errors when I run or if I don't get the build errors then the button doesn't do anything.

I referred this article to implement but not able to get much results : http://nraykov.wordpress.com/2010/06/27/show-save-as-dialog-with-content-disposition-response-header/

Let me know if m miising any detail or u need some more information.

Please suggest.

1 Answer 1

1

Guessing it's the ActionLink that doesn't create the correct URL for you.

try this:

@Html.ActionLink("Manifest", "Export", "Deployment", null, new {@class = "button"})
Sign up to request clarification or add additional context in comments.

4 Comments

I changed the ActionLink it is now generating the correct URL.. finally its calling the Action.. but when I click it doesn't do anything.. just goes to blank screen...
the actionlink does a http-get but your action requires a post with the attribute: [HttpPost].
You're right!! I changed the Action to HTTPGet and its calling the function, but now it takes me to null and return to "Index" view everytime... what should I do so it should prompt the "Save As" dialog?
then it's not in your cache probably. try creating new instance of DeploymentDto and setting it manually in the controller.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.