简体   繁体   中英

Is there any limit on how much text asp:label control can hold?

如果我想存储很长的文本,应该使用它吗?

I would use <asp:literal enableviewstate='false' ... as it is apparently more lightweight than a <asp:label ...

A Literal control is much more light weight than a Label.. it's meant to write out text/html directly to the browser. A Label is little bulkier than a Literal, but has all benefits of a WebControl such as styling options etc.

It should also be noted that a label will wrap your content with <span> ... </span> whereas a literal does not.

A label is the HTML equivalent of a span in when rendered. It holds any valid string.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM