Header in ASP.Net?

S

Sam

I want to create header whereby I could reuse whenever new aspx.

However, it is display nothing and please find my coding:


index.aspx
==========
<%@ Page Language="VB" %>
<%@ Register TagPrefix="AJIMALERPFINANCE" TagName="Header" Src="header.ascx"
%>

<script runat="server">

My Main Page

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<!-- Insert content here -->
</form>
</body>
</html>


header.ascx
===========
<html>
<head>
<title>Enterprise Resources Planning Archival System</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="sub/header.css" type="text/css" rel="stylesheet" />
<meta content="MSHTML 6.00.2900.2523" name="GENERATOR" />
</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0"
marginheight="0" marginwidth="0">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr valign="top">
<td colspan="2">
<table class="HeadBg" cellspacing="0" width="100%"
border="0">
<tbody>
<tr valign="top">
<td class="SiteLink" align="right"
background="sub/bars.gif" colspan="3">
</td>
</tr>
<tr>
<td width="10" rowspan="2">
&nbsp;
</td>
<td height="40">
<span class="SiteTitle"
id="Banner_siteName">&nbsp; Ajinomoto Malaysia - Enterprise
Resources Planning Archival : Financial
Module</span>
</td>
<td align="middle" rowspan="2">
<!--ASP.NET Logo was here//--></td>
</tr>
<tr>
<td>
<table class="OtherTabsBg"
id="Banner_tabs" style="BORDER-COLLAPSE: collapse" cellspacing="0"
border="0">
<tbody>
<tr>
<td class="TabBg"
style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px
solid; BORDER-BOTTOM: 1px solid; HEIGHT: 25px">
&nbsp;<span
class="SelectedTab">Main Menu</span>&nbsp;
</td>
<td style="BORDER-RIGHT: 1px
solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px
solid; HEIGHT: 25px">
&nbsp;<a
class="OtherTabs"
href="http://www.asp.net/PortalStarterKit/DesktopDefault.aspx?tabindex=1&amp;tabid=2">
Intranet
Home</a>&nbsp;
</td>
<td style="BORDER-RIGHT: 1px
solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px
solid; HEIGHT: 25px">
&nbsp;<a
class="OtherTabs"
href="http://www.asp.net/PortalStarterKit/DesktopDefault.aspx?tabindex=2&amp;tabid=3">
ERP
Archival Home</a>&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>


Please advise the error and please assist.

Many thanks.
 
S

Steve C. Orr [MVP, MCSD]

You have a full HTML page in index.aspx and in Header.ascx.
This is a problem since the result should be a single HTML page.
Your header should be part of a page, and index.aspx should be part of a
page, and the combined result should be a single valid HTML document.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
 

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

Top