在标签中显示有限的内容 [英] displaying limited content in label

查看:66
本文介绍了在标签中显示有限的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

how to display limited content in  a label.
a label that is in datalist and that datalist fetch data from database and 
suppose there are 100 words and want to display only 50 words in label ,is it possible
, i am using mysql DB . Waiting for Answer.......

推荐答案

标签没有maxlength属性。您可以使用 length 属性进行即兴创作。

A label does not have a maxlength property. You can improvise using the length property.
if(description.length>=50)
       lbl.Text=myProp.SubString(0,50);
else
       lbl.Text=myProp;


这篇关于在标签中显示有限的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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