Akaash Chintamani Meher

Akaash Chintamani Meher

  • 1.3k
  • 320
  • 14.4k

Redirect to a view from different controller

Aug 14 2017 3:08 AM
Hi,

I have a login view. In that view, I am using Jquery post call to run a controller method and its returning a diff view. When I am going to run this, then its not redirect to the mentioned view pls suggest me.
 
thanks in adv.
 
The controller code is as below:
public ActionResult CheckLogin(RegistrationPL data)
{
if (ModelState.IsValid)
{
WCF_Rest_New.RegistrationServiceClient objService = new WCF_Rest_New.RegistrationServiceClient();
WCF_Rest_New.RegistrationDataContract objPL = new WCF_Rest_New.RegistrationDataContract();
objPL.EmailID = data.EmailID;
objPL.Password = data.Password;
string strResult = objService.CheckDefaultUser(objPL);
if (strResult.Equals("EXIST"))
Session["Emailid"] = data.EmailID;
return RedirectToAction("Registration", "Home");
}
return View(data);
}
 

Answers (6)