You create a class:
class MyBasePage : System.Web.UI.Page{
public override Render(HtmlTextWriter writer){
writer.Write("<link....");
base.Render(writer)
}
}
and you make your webforms inherit from that instead of directly from Page
Class WebForm1 : MyBasePage{
//everything else the same
}
the code for the base class isn't 100%...I don't have VS open so
HtmlTextWriter might be wrong and how to use it might be wrong..but should
give you enough to go by ...
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"No One" <no***@yahoo.com> wrote in message
news:41***************@yahoo.com...
I am not sure I understand the common base option. If I create a webform
with C# code behind and set the still sheet in the HTML, how is this enherited
to a new form?
Karl wrote:
The two ways people would mention the most would be to use either a
common base page in all your pages, or to use master pages.
My personal opinion is that for this type of presentation layer stuff,
go with master pages (which you'll find useful a bunch of other ways as
well)
http://www.metabuilders.com/Tools/MasterPages.aspx
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"No One" <no***@yahoo.com> wrote in message
news:41***************@yahoo.com... I have a style sheet file that I would like all .aspx pages to use by
default. Is there a way to set this globally? If so, how?
Thanks.