开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜