Base solution for your next web application
Spring Sale!
Time Offer!
XXdays : XXhrs : XXmin : XXsec
Open Closed

URL is not being changed #754

sampath created

I need to develop an intermediate view in between login page and the dash board (SPA).The new view will show the list of tenants (companies).I have created an action methods as shown below.But unfortunately when I click the "Login" button,the url is not being changed.It stays on the same url (<a class="postlink" href="http://localhost:6240/Account/Login">http://localhost:6240/Account/Login</a>).But when I check it with the debug all the methods are being fired without any issues. But url is not being changed.Could you tell me why ? Thanks.

Url should be : <a class="postlink" href="http://localhost:6240/Account/ComapnyLogin">http://localhost:6240/Account/ComapnyLogin</a>

Note : When I execute above url on the browser then the view is being shown correctly.But it is not working auto when user clicks the "Login" button.

Post method :

        public virtual ActionResult CompanyLogin(LoginViewModel loginModel, string returnUrl = "", string returnUrlHash = "")

              return RedirectToAction("CompanyLogin");

Get method :

        public ActionResult CompanyLogin()
              return View("CompanyLogin");


<form class="login-form" action="@Url.Action("CompanyLogin")" method="post">

 <button type="submit" class="btn btn-success uppercase">@L("LogIn")</button>


2 Answer(s)
  • 0
    hikalkan created
    Support Team

    Check this: <a class="postlink" href=""> ... er.cs#L147</a>

    Here, you can set any target url after login.

  • 0
    sampath created

    Yes,It works.Thanks a lot :)