I am new to MVC and WCF. I am trying to create an MVC website which calls WCF. First of all, I created the Login function in WCF and calling it from MVC, succesfully .
I cannot figure it out how to REDIRECT user to HOME action after login action with the returned Login object from WCF. How can I redirect the user to all other pages with the Login object(which holds the user information, it is return from WCF)
here is my code below. Please tell me how to redirect...
public class HomeController : Controller
{
AntB2BServiceReference.AntB2BServiceClient service = new AntB2BServiceReference.AntB2BServiceClient();
[HttpGet]
public ActionResult Index(AntB2BServiceReference.Login login)
{
return View();
}
public ActionResult Login()
{
return View();
}
[HttpPost]
public ActionResult Login(string Email,string Password)
{
AntB2BServiceReference.Login login = service.Login(Email, Password);
return RedirectToAction("Index", login);
}
}