我想在点击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");
}