0
< asp:Button runat="server" ID='<%# string.Format("btn/{0}", Eval("category")) %>'  OnClick="btnMark_Click" CommandName='<%#Eval("pin_id") %>' />  

I get "The ID property of a control can only be set using the ID attribute in the tag and a simple value" error when I use this. I searched online, some said remove runat="server" will solve the error, but it will cause my onclick event not triggering when clicked.

rounen
  • 5
  • 2

0 Answers0