Re: newbie: css in every page in app

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Martin Knott (lanmknot_at_coldmail.com)
Date: 11/20/04


Date: Sat, 20 Nov 2004 20:43:12 +0100

Thanks Eirik,

I was doing too at first. Then I needed to add CSS links to each "head"
section of the html. I also wanted to have different css sheets for
different logged on users.

The other problem was that the header was to have a "search" button. I
ended up in a mess with 2 form tags and so on. If you're interested I
found what I think is a good example:

http://www.dotnetjunkies.com/Tutorial/95EBDB54-B8D2-4D33-9DC2-C246793A3A77.dcik

In this you have to code all the controls by hand, rather than drag and
drop. The idea is that the base page has prebuilt containers
(representing Banner, NavBar, Content etc) within the html tags. You
code your child to add controls to these containers. The beauty is that
you get control over both the html head and body. I wish I'd have found
that site 24 hours ago....

cheers

Martin

Eirik Eldorsen wrote:
> Here is an article about making templates in ASP.NET 1.1
> http://www.smartisans.com/articles/vb_templates.aspx
> I've used this method in a couple of projects, but not anymore. I don't
> think it's worth it. Everything get so much more complex.
> So now I just make a header and footer user control, and put them in every
> page. So much easier :-)
>
> "Martin Knott" <lanmknot@coldmail.com> wrote in message
> news:419f21e5$1_3@news.bluewin.ch...
>
>>First, I hope I've posted in the right group.
>>
>>So, to the problem.
>>
>>I'm building an app and I want to use inheritance withthe pages so that
>>common elements are included at the base level. All goes well up to now,
>>the generic page adds the standard components (nav links and banner) and
>>the children then add their specific information.
>>
>>The problem is, how can I add a reference to the CSS stylesheet in the
>>Head section of each derived page? I don't want to add it explicitly to
>>each page.aspx file. I would rather add it to the base, but it seems that
>>the base.aspx isn't parsed. I've tried to get around this by completely
>>removing the head section from childpage.aspx and using the
>>InitializeComponent method of basepage to add the "<!DOCTYPE.....through
>>to <body>" header information including the css link. The problem then is
>>that I don't know where to add the closing tags for the body and the html.
>>
>>I understand that ASP 2.0 tries to solve this kind of thing with Master
>>pages. What's the proper 1.0 way to do this? Just manually add css links?
>>(Hopefully not, since I was thinking of storing the users style preference
>>and then dynamically using it for the app)
>>
>>Thanks in advance, sorry if I'm in the wrong group or my problem was
>>unclear.
>>
>>Martin
>
>
>



Relevant Pages

  • RE: DropDownList Bug?
    ... all controls have autopostback = true. ... <html xmlns="http://www.w3.org/1999/xhtml " xml:lang="en"> ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: switching between HTML and ASPNET
    ... htmlcontrols those controls are recognized in .net code windows but for ... like HTML, TITLE or HEAD even you can set perfectly the attributes ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: HTML mail [was Re: FEL was Re: Hi]
    ... Try it in a browser, ... HTML, per se. ... But you can create an entire page without HTML, HEAD, or BODY ... and the browser will presume to insert them into their proper ...
    (Fedora)
  • Re: Unaccessible floating??
    ... diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat ...
    (comp.infosystems.www.authoring.html)
  • Re: Converting Perl Web Report to Python
    ... by allowing the user to pass in an SQL query parameter to the sql ...
    (comp.lang.python)