How do I perform a secondary action (i.e. calculate fields) in ASP.NET MVC?

后端 未结 2 725
囚心锁ツ
囚心锁ツ 2020-12-20 01:42

I need to do some calculations on an ASP.NET MVC View, an action different than the form submission. I\'ve tried various methods of passing the current Model on to a new con

2条回答
  •  无人及你
    2020-12-20 02:43

    An action link just links to an action. It translates to a action tag. The action it links to has no idea about the state of the page it has just left.

    You should probably be 'POST'ing to an action, but it's only going to send form data, not an object (although mvc can automatically map Form fields to an object).

提交回复
热议问题