开发者

how to display the text on ImageButton

开发者 https://www.devze.com 2022-12-28 23:51 出处:网络
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\">

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

精彩评论

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