Literal control in Part 41

  • دعنا نشارك هذا :
ترتيب الدرس : 41
المدة : 00:11:19
التحكم :
Text version of the video

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.


All ASP .NET Text Articles

All ASP .NET Slides

All Dot Net and SQL Server Tutorials in English

All Dot Net and SQL Server Tutorials in Arabic

Difference between the literal and label controls
1. In many ways a Literal control is similar to a Label control. Both of these controls are used to display Text on a webform. The Text property can be set in the HTML or in the code-behind.
2. Label control wraps the text in a span tag when rendered. Any style that is applied to the Label control, will be rendered using the style property of the span tag. A literal control, doesn't output any surrounding tags. The Text is displayed as is.
3. To apply any styles to a literal control, include them in the Text of the literal control.
4. If you just want the text to be displayed without any styles, then use Literal control, else use Label control.
5. By default, both the Label and Literal Control's does not encode the text they display.
6. To HTML encode the Label Text, Server.HtmlEncode() method can be used, and for Literal control, Mode property can be used.
7. Literal control is a light weight control, when compared with the Label control.

سيتم تفعيل التعليقات قريبا

Sep 23, 2020 07:32:23