473,320 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Header in ASP.Net?

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.
Nov 19 '05 #1
1 1544
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


"Sam" <cy********@hotmail.com> wrote in message
news:eI*************@TK2MSFTNGP12.phx.gbl...
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.

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: John | last post by:
Hi. I am having a few header problems at the moment with a login page. I don't have my headers at the top of the page where I've learned I need to have them. However, I also know I'm supposed...
11
by: Steven T. Hatton | last post by:
In the past there have been lengthy discussiions regarding the role of header files in C++. People have been very adamat about header files serving as in interface to the implementation. I do...
60
by: Derrick Coetzee | last post by:
It seems like, in every C source file I've ever seen, there has been a very definite include order, as follows: - include system headers - include application headers - include the header...
18
by: John Smith | last post by:
Hi all What does the group think of the practise of including one header file from inside another? I have some legacy code where this has been done, and it creates a dependency on a module...
6
by: Jason Collins | last post by:
There seems to be an inconsistency (bug?) in the way the Set-Cookie header is handled by the WebHeaderCollection. That is, the values of Set-Cookie, when an Expires is specified, contain the ","...
0
by: Dean Hallman | last post by:
Hello, I am developing a BHO that should add a custom HTTP header on a specific domain only. Don't want the header globally, otherwise I could just add a registry key. So, on...
4
by: Joseph Geretz | last post by:
We use a Soap Header to pass a token class (m_Token) back and forth with authenticated session information. Given the following implementation for our Logout method, I vastly prefer to simply code...
1
by: Shalako | last post by:
I check my error log and see these entries: malformed header from script. Bad header= Missing gauge reports are ind: padata.pl /perl/pema/padata.pl did not send an HTTP header malformed...
5
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I have a sub in vb.net that adds extra headers to a gridview and it works very well. however, i tried to translate it to c# and i'm getting the header inserting itself over the first datarows and...
30
by: xiao | last post by:
HI~ EVERY ONE~ I have a small program here, when I tried to compile it , it always reminds that arrary.c: In function `main': arrary.c:39: error: `header' undeclared (first use in this...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.