I got a problem with a button control in asp.net webforms.
After using mvc a bit i started using foreach in the aspx files in webforms too, instead of repeaters, mostly cause of all the junk viewstate a repeater creates.
It works great when you just iterate over html controls. But i got a hard time with button controls.
<% foreach (var r in Reports) { %>
<asp:LinkButton OnClick="Click_DeleteResult" CommandArgument='<%= r.ResultId.ToString() %>' runat="server">Delete</asp:LinkButton>
<% } %>
On postback the commandargument on that button becomes "<%= r.ResultId.ToString() %>". So that code doesn't get executed. Is there a good way to fill control properties this way?