将链接标签添加到内容页面
我正在使用asp.net,C#,VS 2005,sql server 2005 ..
我有一个标签:< link rel ="stylesheet" href ="calendar.css" type ="text/css"/>
现在我必须将此标签放在asp:content之内,如:
< asp:Content ID ="Content2" ContentPlaceHolderID ="MainContentPlaceHolder" Runat ="Server">
< link rel ="stylesheet" href ="calendar.css" type ="text/css">
它给出如下错误:
错误4无法切换视图:验证(XHTML 1.0过渡):元素"link"不能嵌套在元素td中.
我有一个使用hTML表设计的母版页.
但是它允许将javascript添加到内容页面...
任何帮助plz
问候
karan
I am using asp.net,C#,VS 2005,sql server 2005..
i have a tag : <link rel="stylesheet" href="calendar.css" type="text/css" />
now i have to place this tag inside asp:content like :
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" Runat="Server">
<link rel="stylesheet" href="calendar.css" type="text/css" >
it is giving error like:
Error 4 Cannot switch views: Validation (XHTML 1.0 Transitional): Element ''link'' cannot be nested within element td.
i hav a master page wihich is designed using hTML table..
but it allows adding javascript to content page......
Any help plz
regards
karan
protected override void OnInit( EventArgs e )
{
this.Header.InnerHtml += "<link rel="stylesheet" href="calendar.css" type="text/css" /link type=\"text/css\" rel=\"Stylesheet\" href=\"styleSheet.css\" />";
base.OnInit(e);
}
您可以在c#中使用about代码并尝试一下,它可能会起作用
you can use the about code in c# and try it,it may work