I am wondering if this can be done as I have not seen a specific example. What I would like to do is this:
However, the template value can't referenced from the Razor syntax. Is there a way to gracefully, get the value of #=EnterpriseImageID# and use it in the call to to Action?
As an FYI - this works but I would like to use the Action helper method if possible:
<script type="text/x-kendo-template" id="template"> <div id="details-container"> <h2>#= EnterpriseImageFileName #</h2> <h2>#=EnterpriseImageID#</h2> <img src='@Url.Action("RenderImage", "Member", new { enterpriseImageID = #=EnterpriseImageID# }, @Request.Url.Scheme)'/> </div></script><script type="text/javascript"> var detailsTemplate = kendo.template($("#template").html()); function showDetails(e) { e.preventDefault(); var dataItem = this.dataItem($(e.currentTarget).closest("tr")); var wnd = $("#Details").data("kendoWindow"); wnd.content(detailsTemplate(dataItem)); wnd.center().open(); }</script>As an FYI - this works but I would like to use the Action helper method if possible:
<script type="text/x-kendo-template" id="template"> <div id="details-container"> <h2>#= EnterpriseImageFileName #</h2> <h2>#=EnterpriseImageID#</h2> <img src='../RenderImage/?enterpriseImageID=#=EnterpriseImageID#' /> </div></script>