Hi, I create a HtmlLink control in my Page_Load function:
private void Page_Load(Object Sender, EventArgs e)
{
HtmlLink link1 = new HtmlLink();
link1.Href = "style.css";
link1.Attributes.Add("rel", "stylesheet");
link1.Attributes.Add("type", "text/css");
// MyHead = head tag ID
MyHead.Controls.Add(link1);
}
The Output should be XHTML-compliant like this:
but instead the closing tag is missing:
I looked for an option to fix this issue, but it looks like this should not happen (according to the default settings for server tags, that doesn't support content).
Krelian_
Member
10 Points
2 Posts
On Page_Load created <link> tag doesn't close properly
Aug 06, 2004 02:37 PM|LINK
private void Page_Load(Object Sender, EventArgs e) { HtmlLink link1 = new HtmlLink(); link1.Href = "style.css"; link1.Attributes.Add("rel", "stylesheet"); link1.Attributes.Add("type", "text/css"); // MyHead = head tag ID MyHead.Controls.Add(link1); }The Output should be XHTML-compliant like this: but instead the closing tag is missing: I looked for an option to fix this issue, but it looks like this should not happen (according to the default settings for server tags, that doesn't support content).Fredrik N
All-Star
29674 Points
5334 Posts
MVP
Re: On Page_Load created <link> tag doesn't close properly
Aug 06, 2004 04:39 PM|LINK
MVP, ASPInsider, WCF RIA Services Insider
My Blog
Krelian_
Member
10 Points
2 Posts
Re: On Page_Load created <link> tag doesn't close properly
Aug 06, 2004 05:10 PM|LINK