我有一个图像按钮。我想在上面添加一个文本“搜索”。我无法添加它,因为 VS 2008 中的“imagebutton”属性中没有文本控件。谁能告诉我如何向图像按钮添加文本?
<asp:ImageButton ID="Searchbutton" runat="server" AlternateText="Search"
CssClass="bluebutton"
ImageUrl="../Graphics/bluebutton.gif" Width="110px"
onclick="Searchbutton_Click"/>
最佳答案
<button runat="server"
style="background-image:url('/Content/Img/stackoverflow-logo-250.png')" >
your text here<br/>and some more<br/><br/> and some more ....
</button>
关于c# - c# asp.net 3.5 中图像按钮上的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/262141/