Solved

Inheriting an ASPX page

Posted on 2004-08-18
1
360 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 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