Static method and TempData, what is another alternative?
I'm trying to find a way to pass a TempData from a static method to another method but I'm having some issue finding the correct answer to this problem bellow, since I can't use a TempData in a static field..
public static XtraReport BuildReportObject(DailyEmployeeRecapSearchCriteria searchCriteria)
{ var resultsContainer = GetReportResults(searchCriteria) TempData['"value"] = resultsContainer; I can't do this, since its a static field.
........
why I wanted to use a TempData so that I could use it into another method.
public FileResult ExportCsvFormat(string dataSource)
{
foreach (var x in (List<GroupBillingCustomerDetails>)TempData["GroupBillingdata"]) > Then here I can use my TempData ...
{
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.