Google Brother Up


Difference between a Label and a Literal in ASP.NET

1. Label is heavy weight so increases size of page while literal is light weight, so decreases size of page.
2. Label supports cssclass property but literal does not support cssclass property.
3. Label cannot be used to insert html code directly but literal can be used to insert html code directly so dynamically html tags can be created.
4. When AssociatedControl property is set, Label produces an html label as its output but when AssociatedProperty is omittedm then Label text will be wrapped in a span.

For more help refer:

177 unique visitors

No comments:

Drop Down List