This question is locked. New answers and comments are not allowed.
Hi,
I'm placing a toolbar with an Export To CSV button passing a routeValue (Guid) by using <#= Id #>, however it is not being rendered correctly.
This code:
ToolBar(commands => commands.Custom()
.HtmlAttributes(new { id = "export_<#= Id #>" })
.Text("Export to CSV")
.Action("ExportDlr", "Job", new { JobId = "<#= Id #>" }))
... Produces:
<a class="t-button " href="/Orchard/Job/ExportDlr?JobId=%3C%23%3D%20Id%20%23%3E&_=1353625773334" id="export_9d8e5f5e-881d-4f7e-a709-33650a7e2760">Export to CSV</a>
Notice that the HtmlAttribute id is rendering correctly using the same <#= Id #>, however the JobId routevalue is not.
Can you kindly enlighten me on this issue?
Thanks and regards,
Chris
I'm placing a toolbar with an Export To CSV button passing a routeValue (Guid) by using <#= Id #>, however it is not being rendered correctly.
This code:
ToolBar(commands => commands.Custom()
.HtmlAttributes(new { id = "export_<#= Id #>" })
.Text("Export to CSV")
.Action("ExportDlr", "Job", new { JobId = "<#= Id #>" }))
... Produces:
<a class="t-button " href="/Orchard/Job/ExportDlr?JobId=%3C%23%3D%20Id%20%23%3E&_=1353625773334" id="export_9d8e5f5e-881d-4f7e-a709-33650a7e2760">Export to CSV</a>
Notice that the HtmlAttribute id is rendering correctly using the same <#= Id #>, however the JobId routevalue is not.
Can you kindly enlighten me on this issue?
Thanks and regards,
Chris