In your View.cshtml:
@Html.ActionLink("Exportar al CSV", "ExportToCSV", new { cellSeparator=CellSeparators.Semicolon })
To your controller:
public ActionResult ExportToCSV(CellSeparators? cellSeparator)
{
if(cellSeparator.HasValue)
{
CellSeparator separator = cellSeparator.Value;
}
}
source
share