Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
6
Reply
Redirect to a view from different controller
Akaash Chintamani Meher
Aug 14 2017 3:08 AM
242
Reply
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);
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
Retrieve and edit checkbox in gridview (data stored in db)
Asp identity admin is not logging ,Admin role seeded in db.