style sheets

N

No One

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.
 
R

Rena

Hi karl,
I just drop by, and have a question about it. I don't know how to use
masterpages in VS .Net 2003 to development my page, as it seems not
supporting.. I had tried b4 but fail to use it, is there anything to
install or it is only available to new version VS.??

Thx.
Rena.
 
N

No One

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?
 
K

Karl Seguin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top