我想在点击 actionlink 时从控制器调用一个动作。它在我的本地运行完美,但在部署后不起作用(结果 404 错误)。请有人帮忙。
看法:
<%:Html.ActionLink("Activate", "RepresentativeAccessActivate","AdminNew", new { id = uselist.email_user_name }, new { onclick = "return confirm('Are you sure you want to activate this user?')" ,@class="view"}) %>
行动 :
[HttpGet]
public ActionResult RepresentativeAccessActivate(string id)
{
FramesBusinessService.FramesBusinessSeviceClient client = new FramesBusinessService.FramesBusinessSeviceClient();
client.Ser_UpdateRepresentativeStatus(id, true, "salesrepresentative");
client.Close();
return RedirectToAction("Representative");
}