Hi I am using this two lines in my code:
using (Ajax.BeginForm("Login", "Users", new { command = "Login"}, new AjaxOptions() { UpdateTargetId = "divLoginPopupContent" }, new { id = "loginPopup" }))
{
/// some html with submit button
// and also have following:
<%= Html.ActionLink("Forgot your password", "Login", "Users", new { command = "ForgotPassword" }, null)%>
}
and this is the map route i have
routes.MapRoute(
"Users",
"Users/{command}",
new { controller = "Users", action = "Login" }
);
and this is the controller action:
public ActionResult Login(LoginModel model, string command)
{
/// some actions
}
but I don'y what I am doing wrong here ... I want ActionLink and BeginForm both to be routed to this controller action.