Ask a Question related to ASP.NET General, Design and Development.
-
Peter Wu #1
ASCX as Header/Footer
Hello,
I want to create a Header and Footer for every ASPX page I build. I
created 2 Web user controls respectively and placed them in an ASPX page.
The problem is that I cannot position the Footer to be always at the
bottom of the page. The Header and Footer are always together at the top
of the page.
Was I missing anything? Thanks!
--
Peter Wu
Powered by Microsoft Windows XP [Version 5.1.2600]
Peter Wu Guest
-
Header & Footer Help
I am trying to add a header to my PDF. When I go to the toolbar - document - and click on add/update/remove, nothing happens. I am not getting a pop... -
Customizing pager/header/footer
I need to put web controls inside pager, header or footer parts of the datagrid. Any ideas? -
cfdocument with header & footer
Well, I got it working using CFHTTP, throwing in a couple of comment tags I can check for to filter out the header and footer, but it's really silly... -
Passing Values from Header to footer of an DataList
Hi I have a TextBox and a Button in Header of a DataList and a Label in the Footer of a DataList. How to pass the value in the TextBox to Lable on... -
include() header and footer
I'm ashamed that I need to ask this question. I've been using PHP for almost a year now, and have used HTML extensively in the last few years. ... -
Ron Vecchi #2
Re: ASCX as Header/Footer
Sounds like an html prob.
A usercontrol will show up where it has been placed with in your document
structure. Similar to SSI.
"Peter Wu" <peterwu@hotmail.com> wrote in message
news:bgbvl5$n8ima$1@ID-117651.news.uni-berlin.de...> Hello,
>
> I want to create a Header and Footer for every ASPX page I build. I
> created 2 Web user controls respectively and placed them in an ASPX page.
> The problem is that I cannot position the Footer to be always at the
> bottom of the page. The Header and Footer are always together at the top
> of the page.
>
> Was I missing anything? Thanks!
>
> --
> Peter Wu
> Powered by Microsoft Windows XP [Version 5.1.2600]
>
>
Ron Vecchi Guest
-
Peter Wu #3
Re: ASCX as Header/Footer
Ron Vecchi <vencenzo@comcast.net> wrote:
The problem is that I cannot move it to the bottom of the page. :-(> Sounds like an html prob.
>
> A usercontrol will show up where it has been placed with in your
> document structure. Similar to SSI.
--
Peter Wu
Powered by Microsoft Windows XP [Version 5.1.2600]
Peter Wu Guest
-
Steve C. Orr, MCSD #4
Re: ASCX as Header/Footer
Double check to make sure your HTML is well formed in your page and ASCX
(and the combined HTML output.)
Even if it was well formed to begin with, sometimes the designer "helps" you
by adding closing HTML elements in places where you didn't want them.
--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]
"Peter Wu" <peterwu@hotmail.com> wrote in message
news:bgc1a1$l7t2k$1@ID-117651.news.uni-berlin.de...> Ron Vecchi <vencenzo@comcast.net> wrote:
>>> > Sounds like an html prob.
> >
> > A usercontrol will show up where it has been placed with in your
> > document structure. Similar to SSI.
> The problem is that I cannot move it to the bottom of the page. :-(
>
> --
> Peter Wu
> Powered by Microsoft Windows XP [Version 5.1.2600]
>
>
Steve C. Orr, MCSD Guest
-
Peter Wu #5
Re: ASCX as Header/Footer
Steve C. Orr, MCSD <Steve@Orr.net> wrote:
Unfortunately, it does not work. :(> Just drag or cut/paste the footer control down to the bottom of the page
> where you want it.
Here goes my page in HTML. Thanks.
<%@ Page language="c#" Codebehind="Login.aspx.cs" AutoEventWireup="false"
Inherits="WUTT.Login" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Footer.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Login</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<LINK href="Style.css" type="text/css" rel="stylesheet">
</HEAD>
<body ms_positioning="GridLayout">
<p></p>
<form id="Form1" method="post" runat="server">
<uc1:Header id="Header1" runat="server"></uc1:Header>
<asp:TextBox id="txtUsername" style="Z-INDEX: 101; LEFT: 462px;
POSITION: absolute; TOP: 187px"
runat="server" Width="240px" tabIndex="1" Height="22"></asp:TextBox>
<asp:TextBox id="txtPassword" style="Z-INDEX: 102; LEFT: 462px;
POSITION: absolute; TOP: 216px"
runat="server" Width="240px" TextMode="Password" tabIndex="2"
Height="22"></asp:TextBox>
<DIV style="DISPLAY: inline; Z-INDEX: 103; LEFT: 330px; WIDTH: 121px;
POSITION: absolute; TOP: 187px; HEIGHT: 22px"
ms_positioning="FlowLayout">
<P>Username:</P>
</DIV>
<DIV style="DISPLAY: inline; Z-INDEX: 104; LEFT: 330px; WIDTH: 121px;
POSITION: absolute; TOP: 216px; HEIGHT: 22px"
ms_positioning="FlowLayout">Password:</DIV>
<asp:Button id="btnLogin" style="Z-INDEX: 105; LEFT: 489px; POSITION:
absolute; TOP: 270px"
runat="server" Width="104px" Text="Login" tabIndex="2"
Height="24px"></asp:Button><INPUT style="Z-INDEX: 106; LEFT: 599px; WIDTH:
104px; POSITION: absolute; TOP: 270px; HEIGHT: 24px"
type="reset" size="100px" value="Reset" tabIndex="3">
<asp:Label id="lblWarning" style="Z-INDEX: 107; LEFT: 339px; POSITION:
absolute; TOP: 331px"
runat="server" Width="366px" Visible="False" Font-Overline="True"
Font-Underline="True"
Font-Bold="True" ForeColor="Red" Height="7px">* Bad username or
password. Please try again!</asp:Label>
<DIV style="DISPLAY: inline; Z-INDEX: 108; LEFT: 80px; WIDTH: 206px;
POSITION: absolute; TOP: 50px; HEIGHT: 28px"
ms_positioning="FlowLayout">
<P>Login</P>
</DIV>
<DIV style="DISPLAY: inline; FONT-SIZE: larger; Z-INDEX: 109; LEFT:
288px; WIDTH: 384px; POSITION: absolute; TOP: 120px; HEIGHT: 16px"
ms_positioning="FlowLayout">Welcome! Please enter your username and
password.
</DIV>
<uc1:Footer id="Footer1" runat="server"></uc1:Footer>
</form>
</body>
</HTML>
--
Peter Wu
Powered by Microsoft Windows XP [Version 5.1.2600]
Peter Wu Guest
-
Seaside #6
Re: ASCX as Header/Footer
I use all user controls on most of my sites. I use header, top navigation,
left navigation content to the right and a footer. Each of these elements is
a user control. The trick is to be sure that your code makes sense from top
to bottom tracking it all the way through your user controls as if it were
one page without user controls.
There is an example of this method at [url]http://islandclub.us[/url]
HTH
"Peter Wu" <peterwu@hotmail.com> wrote in message
news:bgbvl5$n8ima$1@ID-117651.news.uni-berlin.de...> Hello,
>
> I want to create a Header and Footer for every ASPX page I build. I
> created 2 Web user controls respectively and placed them in an ASPX page.
> The problem is that I cannot position the Footer to be always at the
> bottom of the page. The Header and Footer are always together at the top
> of the page.
>
> Was I missing anything? Thanks!
>
> --
> Peter Wu
> Powered by Microsoft Windows XP [Version 5.1.2600]
>
>
Seaside Guest
-
Peter Wu #7
Re: ASCX as Header/Footer
Steve C. Orr, MCSD <Steve@Orr.net> wrote:
I think ASP.NET generates the HTML code correctly. Now, it is the IE> Double check to make sure your HTML is well formed in your page and ASCX
> (and the combined HTML output.)
> Even if it was well formed to begin with, sometimes the designer
> "helps" you by adding closing HTML elements in places where you didn't
> want them.
problem. Why doesn 't IE display the copyright claim at the bottom?
Thanks.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Login</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<LINK href="Style.css" type="text/css" rel="stylesheet">
</HEAD>
<body>
<form name="Form1" method="post"
action="Login.aspx?ReturnUrl=%2fWUTT%2fMainMenu.as px" id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDw2MjkwNDU3Mzg7Oz75y+cu2/Z/dMJFgwdibwILNJVAyg==" />
<input name="txtUsername" type="text" id="txtUsername" tabindex="1"
style="height:22px;width:240px;Z-INDEX: 101; LEFT: 462px; POSITION:
absolute; TOP: 187px" />
</form>
<div>Copyright
This program is protected by
US and international copyright law.</div>
</body>
</HTML>
--
Peter Wu
Powered by Microsoft Windows XP [Version 5.1.2600]
Peter Wu Guest
-
Michael #8
ASCX as Header/Footer
Try putting the header and footer into separate files.
That way you can use them anywhere you want.
HTHI build. I>-----Original Message-----
>Hello,
>
>I want to create a Header and Footer for every ASPX pagein an ASPX page.>created 2 Web user controls respectively and placed themalways at the>The problem is that I cannot position the Footer to betogether at the top>bottom of the page. The Header and Footer are always>of the page.
>
>Was I missing anything? Thanks!
>
>--
>Peter Wu
>Powered by Microsoft Windows XP [Version 5.1.2600]
>
>
>.
>Michael Guest
-
Rory #9
ASCX as Header/Footer
Why not try creating a base page class that already has
the header and footer interface defined. Then all your
pages can just derive from this.
I build. I>-----Original Message-----
>Hello,
>
>I want to create a Header and Footer for every ASPX pagein an ASPX page.>created 2 Web user controls respectively and placed themalways at the>The problem is that I cannot position the Footer to betogether at the top>bottom of the page. The Header and Footer are always>of the page.
>
>Was I missing anything? Thanks!
>
>--
>Peter Wu
>Powered by Microsoft Windows XP [Version 5.1.2600]
>
>
>.
>Rory Guest
-
Peter Wu #10
Re: ASCX as Header/Footer
Rory <rory@vivid-design.com.au> wrote:
Any samples how to do this? Thanks.> Why not try creating a base page class that already has
> the header and footer interface defined. Then all your
> pages can just derive from this.
--
Peter Wu
Powered by Microsoft Windows XP [Version 5.1.2600]
Peter Wu Guest
-
Peter Wu #11
Re: ASCX as Header/Footer
Steve C. Orr, MCSD <Steve@Orr.net> wrote:
I still use GridLayout for the form and give the Footer the pixel position> OIC, it looks like you are using GridLayout.
> Notice how all your web controls have pixel positions listed? Well your
> header and footer do not. This is basically the same as saying that
> the top & left are 0,0 (at the top of the form)
> Either give them pixel positions or switch your page to Flow Layout and
> get rid of all the positioning HTML code.
like this:
<uc1:Footer id="Footer1" runat="server" style="Z-INDEX: 107; LEFT: 0px;
POSITION: absolute; TOP: 500px"></uc1:Footer>
But it does not help. The rendered HTML just loses the position specified.
Please help!
--
Peter Wu
Powered by Microsoft Windows XP [Version 5.1.2600]
Peter Wu Guest
-
gerry #12
Re: ASCX as Header/Footer
this is because you are using absolute positioning in the input control
"Peter Wu" <peterwu@hotmail.com> wrote in message
news:bgc2qm$n2780$1@ID-117651.news.uni-berlin.de...> Steve C. Orr, MCSD <Steve@Orr.net> wrote:
>>> > Double check to make sure your HTML is well formed in your page and ASCX
> > (and the combined HTML output.)
> > Even if it was well formed to begin with, sometimes the designer
> > "helps" you by adding closing HTML elements in places where you didn't
> > want them.
> I think ASP.NET generates the HTML code correctly. Now, it is the IE
> problem. Why doesn 't IE display the copyright claim at the bottom?
> Thanks.
>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> <HTML>
> <HEAD>
> <title>Login</title>
> <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
> <meta name="CODE_LANGUAGE" Content="C#">
> <meta name="vs_defaultClientScript" content="JavaScript">
> <meta name="vs_targetSchema"
> content="http://schemas.microsoft.com/intellisense/ie5">
> <LINK href="Style.css" type="text/css" rel="stylesheet">
> </HEAD>
> <body>
> <form name="Form1" method="post"
> action="Login.aspx?ReturnUrl=%2fWUTT%2fMainMenu.as px" id="Form1">
> <input type="hidden" name="__VIEWSTATE"
> value="dDw2MjkwNDU3Mzg7Oz75y+cu2/Z/dMJFgwdibwILNJVAyg==" />
>
> <input name="txtUsername" type="text" id="txtUsername" tabindex="1"
> style="height:22px;width:240px;Z-INDEX: 101; LEFT: 462px; POSITION:
> absolute; TOP: 187px" />
> </form>
>
> <div>Copyright
> This program is protected by
> US and international copyright law.</div>
>
> </body>
> </HTML>
>
>
>
>
> --
> Peter Wu
> Powered by Microsoft Windows XP [Version 5.1.2600]
>
>
gerry Guest



Reply With Quote

