0

I have a controller DPN and within that controller, I have an Action Method

[HttpGet]
public virtual ActionResult Report(string reportName)
{
   str_ReportPath = string.IsNullOrEmpty(str_ReportPath) ? "/BundleDealer/" + reportName : str_ReportPath;
   return View();
}

I want to know how can I pass a parameter to Report using Url.Action I tried this but got an error

<a href="@Url.Action(MVC.DPN.Report(), "AffiliateTFNDailySummary")">Provider</a>
Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197
zaria khan
  • 333
  • 3
  • 8
  • 18

2 Answers2

1

Try this:

<a href="@Url.Action("Report", "controller name", new { reportName = "AffiliateTFNDailySummary" })">Provider</a>
Jakub Rusilko
  • 859
  • 12
  • 17
1
Url.Action("Report", "ControllerName", new { reportName = "AffiliateTFNDailySummary"});
Vivek Nuna
  • 25,472
  • 25
  • 109
  • 197