图像按钮下的文本 [英] Text under an Image button

查看:80
本文介绍了图像按钮下的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  

可能重复:结果
  在C#ASP图像按钮文本.NET 3.5


我有一个图像按钮。我想在它之下添加文本。我使用的是2010年VS谁能告诉我如何将文本添加到图像按钮??

 < ASP:ImageButton的ID =ImageButton1=服务器的ImageUrl =图片/ Icon_Variante1.jpg/>


解决方案

如果您要添加文本的按钮,你应该在按钮后添加一个标签。然后把标签和按钮到容器并改变样式它。以下

这是例子

 < D​​IV的风格=宽度:100像素;>
        < D​​IV>
            < ASP:ImageButton的=服务器ID =BUTTON的ImageUrl =IMAGE_URL/>
        < / DIV>
        < D​​IV>
            < ASP:标签=服务器ID =Label1的文本=TEXT按键的>< / ASP:标签>
        < / DIV>
    < / DIV>

Possible Duplicate:
Text on an Image button in c# asp.net 3.5

I have an image button. I want to add a text under it. I'm using VS 2010. Can anyone tell me how to add text to a image button??

<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="Images/Icon_Variante1.jpg" />

解决方案

If you want to add text under the button, you should add a label after the button. Then put the label and the button into a container and change styles for it. An example below

    <div style="width:100px;">
        <div>
            <asp:ImageButton runat="server" ID="BUTTON" ImageUrl="IMAGE_URL" />
        </div>
        <div>
            <asp:Label runat="server" ID="Label1" Text="TEXT FOR BUTTON"></asp:Label>
        </div>
    </div>

这篇关于图像按钮下的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆