使用多行在标签控件中插入文本 [英] insert text in label control with multiline

查看:86
本文介绍了使用多行在标签控件中插入文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在asp.net中有一个标签控件

i想在我的标签上输入一个文本

但是这个文字很长

我希望在我的标签控件上多行插入此文本

plz hlp me

给我一个代码c#插入新行

i have a label control in asp.net
i want inser a text on the my label
but this text is very long
and i want insert this text in multi line on the my label control
plz hlp me
give me a code c# for insert new line

推荐答案

标签是一个内联元素,因此设置宽度或高度不起作用。 Trick将改为使用 TextBox ,使其看起来像最终用户的标签。



在这里,请阅读此提示:在标签控件中包装文本行 [ ^ ]
Label is an inline element and hence setting width or height would not work. Trick would be to use a TextBox instead and make it look like a label for the end user.

Here, read this tip: Wrapping Text Line in a label control [^]


这篇关于使用多行在标签控件中插入文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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