例如
@url.Action("Actionname", "ControllerName", new { id=@item.id, @class="test"})
我在 Ajax 中想要这样的东西,就像这样:
@Ajax.action("Actionname", "ControllerName",new { id=@item.id, @class="test"})
我试过这个,但它对我没有好处:
@Ajax.ActionLink(".", "DeleteCountry", "Main", new AjaxOptions { HttpMethod = "Post", InsertionMode = InsertionMode.Replace, UpdateTargetId = "Details" }, new { CountryID = item.CountryID , @class="fa fa-times"}) @Ajax.ActionLink(".", "EditCountry", "Main", new AjaxOptions { HttpMethod = "POST", InsertionMode = InsertionMode.Replace, UpdateTargetId = "Details" }, new {CountryID=item.CountryID,@class="fa fa-pencil"})
任何人都可以帮助我吗?