Solved

Inheriting an ASPX page

Posted on 2004-08-18
1
362 Views
Last Modified: 2010-04-15
Ok,

I know you can inherit the CS code from one form into another ... I wanto to know if I can do the same for the HTML code ...

eg: I want to set the CSS on just the base page so I don't have to repeat it in every page ...

0
Comment
Question by:Pete2003
1 Comment
 
LVL 3

Accepted Solution

by:
nhewitt21 earned 250 total points
ID: 11829878
ok what i would do here is make a header and footer page, and just include that on all the pages you want them.

heres my page with the includes:
<HTML>
<HEAD>
<title runat="server" id="title"></title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="VBScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0" name="vs_targetSchema">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK href="common/styles/styleTest3.css" type="text/css" rel="stylesheet">
</HEAD>
<body>
<form id="Emda_Cms_Default" method="post" runat="server">
<!--#include virtual="Includes/Header.aspx" -->
YOUR BODY TEXT GOES HERE<br />
<!--#include virtual="Includes/Footer.aspx" -->
</form>
</body>
</HTML>

now when you create your header and footer as an aspx page you don't want any code behind pages.

Hope this helps you

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question