HTML enhancements in ASP.Net 2.0

HTML enhancements in ASP.Net 2.0

HTML enhancements in ASP.Net 2.0

Accessing tag:

The link tag is useful to register a CSS file with our Webpage. It can be accessed in codebehind or can be added through codebehind by the following code.

HtmlLink cssLink = new HtmlLink();
cssLink.Href = “StyleSheet.css”;
cssLink.Attributes.Add(”rel”, “stylesheet”);
cssLink.Attributes.Add(”type”, “text/css”);
Page.Header.Controls.Add(cssLink);

This will inject a

This class is new in 2.0 while this also can be achieved thro HtmlInputButton class in 1.x.

Leave a Reply


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.