I have the Checkout form, that let the user check out there quote when they are success log in.
This is a part of my action:
[Authorize]
public JsonResult ConfirmCheckout(string id)
{
.......
}
This is my LogonCustomer action :
[HttpPost]
public ActionResult LogOnCustomer(LogOnModel model, string returnUrl, FormCollection frm)
{
if (ModelState.IsValid)
{
if (MembershipService.ValidateCustomer(model.UserName, model.Password))
{
this.AuthCustomer = MembershipService.AuthCustomer;
if (!String.IsNullOrEmpty(returnUrl))
{
return Redirect(returnUrl);
}
else
{
//tesing whether the password of the user is number
if (HelperClass.IsStrongPassword(model.Password) == false)
{
return Redirect(@"~/Account/ChangeDefaultPassword?"+model.UserName);
}else{
FormsService.SignIn(model.UserName, model.RememberMe);
return RedirectToAction("RedirectPage", "Account");
}
}
}
}
When user click the link to /Quotation/Checkout/, the user have to log in with the valid user name and password.
Problem : When the user fill in the valid user name and valid password, they still on the Logon form, Not go to the ‘/Quotation/Checkout’.
Could anyone solve this problem for me? Thanks you and waiting to your response.
That’s because you need to have your
returnUrlpopulated in yourActionLink()that the user clicks on.For instance: