如何在固定宽度的链接按钮上换行 [英] How to wrap text on a link button with fixed width

查看:55
本文介绍了如何在固定宽度的链接按钮上换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Yogesh,我想知道如何在固定宽度的LinkBut​​ton上包裹文本.
有什么办法吗?当我在其上动态显示文本时,文本不会被换行,而是显示在一行中,从而自动增加LinkBut​​ton的宽度. LinkBut​​ton应该是HTML中的任何一种:控件或ASP链接控制.
请提出解决方案(如果有的话),或者提出一些不同的解决方案.例如:

Hi I am Yogesh I want to know how to wrap text on a LinkButton with a fixed width.
Is there any way to do this? When I dynamically display the text on it, the text is not getting wrapped, it displays in a single line and thereby auto increasing the width of LinkButton. LinkButton should be any of HTML: a control or ASP link contol.
Please suggest the solution if any, or suggest some different solutions. with eg:

推荐答案

将样式应用于链接"按钮,如下所示.

Apply style to your Link Button as below.

<asp:linkbutton id="LinkButton1"
Text="Click Me"
style="width:20px;word-wrap:break-word"
OnClick="LinkButton_Click"
runat="server"/>


这篇关于如何在固定宽度的链接按钮上换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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