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

后端 未结 7 2033
耶瑟儿~
耶瑟儿~ 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:37

    The label control also has the AssociatedControlId property that associates the label with another control. An example of where this is useful is with a textbox control. Once these are associated, screen readers are more able to give better results.

    Another example is a radio button with a label allows you to click on the label and the radiobutton will select if the AssociatedControlId property is set.

    MSDN on AssoicatedControlId

提交回复
热议问题