Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have controller say ControllerA with a ActionResult XYZ that creates a list of employee and stores it in TempData["EmployeeDetails"] and then redirects to the corresponding view. The View(XYZ) has a link that redirects to another ActionResult ABC, which displays the list.
C#
public XYZ(int EmployeeDOB)
{
   //Creates a List based of same Date Of Birth
   TempData["EmployeeList"] = lstEmployee;
   return View();
}

In the view XYZ is a form dat takes the input EmployeeDOB which later redirects to another View ABC that displays the main List.
C#
public ActionResult ABC()
{
  List<Employee> lstEmployeeDetail = TempData["EmployeeList"] as List<Employee>();
  //Display the result
}

At my localhost the code works fine the list is viewed correctly, but on the production site due to "https" the TempData returns as null.
How to resolve this issue???
Posted
Updated 27-Aug-14 22:50pm
Comments
Ranjeet Patel 28-Aug-14 7:42am    
I am in strange... because this should work as you are saying that it worked in localhost..
there is nothing to do with https://
and I fill that TempData is not currently used in you code. though this is my view.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900