how to display the text on ImageButton
how to display the text on ImageButton. or how to have a linkbutton on Image
I have tried this:
<asp:LinkButton ID="lbYear" runat="server" CausesValidation="false" Text="HOME">
<asp:Image ID="Image1" runat="server" ImageUrl="~/images/menu.png" Width="90px" Height="39px" />
</asp:LinkButton>
but it is showing t开发者_运维百科he text above the Image..
It seems like you're actually in need of <asp:ImageButton />
, which is basically an Image and LinkButton control wrapped into one:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.imagebutton.aspx
Richard.
精彩评论