Try one of the following in your page's Load event handler.
// Add a style sheet link.
HtmlGenericCont rol Style = new HtmlGenericCont rol();
Style.Attribute s.Add("type", "text/css");
Style.Attribute s.Add("rel", "stylesheet ");
Style.Attribute s.Add("href", "MyStyle.cs s");
Header.Controls .Add(Style);
// Add inline style.
HtmlGenericCont rol Style = new HtmlGenericCont rol();
Style.InnerText = "h1 { color: #0F0; } .MySelector { background-color:
#F90; }";
Header.Controls .Add(Style);
Good luck!
- Matt
----- Original Message -----
From: ad
Date: 8/4/2006 2:29 AM
I use vs2005 to develop web application.
I have used the new feature of master page of VS2005, and I have put some
<stylein the master page.
But I want to override some Style sheet in the content page.
Where to put the <stylein the content page ?