如何设置标签或链接按钮文本的长度 [英] how to set the length of a label or link button text

查看:103
本文介绍了如何设置标签或链接按钮文本的长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
在我的Web应用程序中,我正在使用链接按钮来显示一些名称,并且我想将该链接按钮的长度设置为10或15,不想超出该长度,我已经设置了宽度和高度,但未使用满了,所以请帮助我.
谢谢.

Hi everybody,
In my web application, i am using link button for showing some name and i want to set the length of that link button to 10 or 15, dont want to exceed the length over that, i have set the width and height but its not use full , so please help me .
Thanking you.

推荐答案

您可以使用如下所示的substring函数显示链接文本的前15个字符.
You can just display the first 15 characters of the link text using the substring function like following.
YourLinkButton.Text = YourLinkText.Substring(0, 15);


这篇关于如何设置标签或链接按钮文本的长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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