将div内容传递给控制器

时间:2016-11-06 07:38:58

标签: c# asp.net-mvc

示例:

<div id="result"> some action </div>
@Ajax.ActionLink("Vote", "vote", new { id = Model.Catalog_Id, vote = result }, new AjaxOptions { HttpMethod = "POST", OnSuccess = "location = location", Confirm = "Are you sure to vote?" })

当用户选择不同的单选按钮值时,Div结果将立即更改。我想将最新的单选按钮值传递给控制器​​以插入数据。这可能吗?

1 个答案:

答案 0 :(得分:0)

使用ajax方法调用可以解决问题