Inner image and text of asp:LinkButton disappears after postback
This problem is now known to Microsoft, and they have published an official statement and workaround on the Microsoft Connect issue 718810: LinkButton controls collection lost on postback.
Microsoft statement is:
Thank you for the feedback. This seems like an oddity with the fact that the LinkButton control allows either direct text content via the Text property or in markup, or sub-controls via the Controls collection or markup. The workaround is to use a placeholder as the root content for the control and place the desired mixed content in there, e.g.
<asp:LinkButton runat="server">
<asp:PlaceHolder runat="server">
This is some text.</br>
<asp:Label runat="server">This is a control</asp:Label>
</asp:PlaceHolder>
</asp:LinkButton>
I found the solution:
I had to add runat="server"
to the <img>
tag inside the <asp:LinkButton>
:
<img src="img/print-icon.png" alt="" runat="server" />