5
@Html.ActionLink("Exportar al CSV", "ExportToCSV", new { ?? })
Teşekkür ederiz!
@Html.ActionLink("Exportar al CSV", "ExportToCSV", new { ?? })
Teşekkür ederiz!
@ Html.ActionLink ("exportar ark CSV" yeni "ExportToCsv", {cellSeparator = (int) CellSeparators.Semicolon})
ve
public ActionResult ExportToCSV(int cellSeparator)
{
CellSeparator separator = (CellSeparator)cellSeparator;
}
zarif değil ama senin View.cshtml içine
yararlıdır:
@Html.ActionLink("Exportar al CSV", "ExportToCSV", new { cellSeparator=CellSeparators.Semicolon })
Kontrolörünüzün içine:
public ActionResult ExportToCSV(CellSeparators? cellSeparator)
{
if(cellSeparator.HasValue)
{
CellSeparator separator = cellSeparator.Value;
}
/* ... */
}
Teşekkür ederiz! Yaklaşımınız çalışıyor. –
Ayrıca RouteValueDictionary http://stackoverflow.com/questions/3976371/pass-collection-of-enums-to-asp-net-mvc-actionmethod –