What's the Literal control used for and what's the difference to the Label Control in asp.net?

后端 未结 7 2066
耶瑟儿~
耶瑟儿~ 2021-01-04 02:06

What Literal control is used for in asp.net? and What is the difference between them and Label control?

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-04 02:55

    As splattne mentions, the label encloses its text in a span, whereas the literal is simply a placeholder. However, be careful in making assumptions about how ASP.Net controls are going to render. It can depend on the user agent that you are using. For instance, the panel control renders as a div in IE, but renders as a table with Firefox.

提交回复
热议问题