<#= Id #>
<%: Html.ActionLink("Download Last Log", "DownloadLastTestRunLogFile", "AutomationRequests", new { requestId = "<#= Id =>" }, new { @class = "button" })%>
The first <#= Id #> is correctly binding to the Id number, however the data binding is not working in the requestId parameter. This is causing the template to contain the following URL: http://localhost:59269/AutomationRequests/DownloadLastTestRunLogFile?requestId=%3C%23%3D%20Id%20%3D%3E
How can I get the action link's requestId parameter to data bind?
4 Answers, 1 is accepted
In this case you should manually decode the generated URL similar to the following:
Server.UrlDecode(Html.ActionLink("Download Last Log", "DownloadLastTestRunLogFile", "AutomationRequests", new { requestId = "<#=Id#>" }, new { @class = "button" }).ToHtmlString())Also note that there is an syntax error in the template.
This
new { requestId = "<#= Id =>" }
should be
new { requestId = "<#= Id #>" }
Regards,
Rosen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Unfortunately, after further evaluation it seems like Telerik grids are not up to the quality I need. I am requiring a grid that is constantly updated every 15-30 seconds, and unfortunately Telerik grids cannot handle refreshes very well. Even when data doesn't change, a refresh causes my selection to be unselected, and the detail view collapsed. Other javascript grids I have used are smart enough to know when data comes in, that the record is already in the grid and it just needs to update it's data, not wipe all current data and recreate all the records like Telerik's grids seem to do.
Although, not built-in, persisting selected state and detailView's expanded state can be achieved with few lines of JavaScript. I have attached a small sample which demonstrates a possible implementation.
I hope this helps.
Rosen
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
Thanks!