473,320 Members | 1,978 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.

Page layouts in ASP.NET

Hi, I am writing a little web-app in Visual Studio.NET using C# and ASP.net.

I have a few questions about page layouts. ..

What I am trying to achieve is to have every page in my app like the
following: It will be a table that fills the entire browser window and has a
header at the top, a navbar on the left, a footer at the bottom and the body
section on the right.

I am wondering how to fit this into the visual studio thing where you design
each page in the designer? Really what I want is for the designed page to
be squeezed into the body section on the above layout.

If I have to abandon using the page designer altogether, and just generate
the HTML myself, that will be OK but it would be better if I can still use
it to design each page as we want it, and then have that inserted into our
body section.

If I have to hardcode it without the page designer then what should I be
using to include the html and aspx files? I've tried stuff like:

<TABLE cellSpacing="1" cellPadding="1" width="300" border="1" height="32">
<TR>
<TD><!--#Include File="TestHeader.htm"--></TD>
</TR>
<TR>
<TD><!--#Include File="Deals.aspx"--></TD>
</TR>
<TR>
<TD><!--#Include File="TestFooter.htm"--></TD>
</TR>
</TABLE>

in an aspx file just to try get a header/body/footer layout going but the
deals.aspx file output just goes straight over the top of the table (and the
TestHeader.htm and TestFooter.htm output).

Any advice?

Thank you in advance
Angus
Nov 18 '05 #1
3 1453

"Angus SC2" <a@b.com> wrote in message news:30*************@uni-berlin.de...
Hi, I am writing a little web-app in Visual Studio.NET using C# and
ASP.net.

I have a few questions about page layouts. ..


If possible I would like to be able to generate html in a string object in
the form handler and squirt it into some part of the page

Thanks
Angus
Nov 18 '05 #2
Create a header and footer user control (.ascx) and place these at the top
and bottom of every page you create with the designer. If you are using
Whidbey then you can creat a master page with the required layout and
inherit from that to create individual pages with the content you require.

MattC

"Angus SC2" <a@b.com> wrote in message news:30*************@uni-berlin.de...
Hi, I am writing a little web-app in Visual Studio.NET using C# and ASP.net.
I have a few questions about page layouts. ..

What I am trying to achieve is to have every page in my app like the
following: It will be a table that fills the entire browser window and has a header at the top, a navbar on the left, a footer at the bottom and the body section on the right.

I am wondering how to fit this into the visual studio thing where you design each page in the designer? Really what I want is for the designed page to
be squeezed into the body section on the above layout.

If I have to abandon using the page designer altogether, and just generate
the HTML myself, that will be OK but it would be better if I can still use
it to design each page as we want it, and then have that inserted into our
body section.

If I have to hardcode it without the page designer then what should I be
using to include the html and aspx files? I've tried stuff like:

<TABLE cellSpacing="1" cellPadding="1" width="300" border="1" height="32">
<TR>
<TD><!--#Include File="TestHeader.htm"--></TD>
</TR>
<TR>
<TD><!--#Include File="Deals.aspx"--></TD>
</TR>
<TR>
<TD><!--#Include File="TestFooter.htm"--></TD>
</TR>
</TABLE>

in an aspx file just to try get a header/body/footer layout going but the
deals.aspx file output just goes straight over the top of the table (and the TestHeader.htm and TestFooter.htm output).

Any advice?

Thank you in advance
Angus

Nov 18 '05 #3
For this particular issue you could put a PlaceHolder on the page and
then in your code behind create your html, put it in a literal control,
and add the literal control to the placeholder's controls collection.
That would "squirt" it into place. (that makes two questions today that
this will solve)

However for your original question you should take a look at Paul
Wilson's Master Pages article here:

http://authors.aspalliance.com/PaulW...rticles/?id=14

It is a really smooth framework that does a great job with allowing you
to create template pages without rebuilding the static "C" clamp parts
of the page. Hope it helps.

Have A Better One!

John M Deal, MCP
Necessity Software

Angus SC2 wrote:
"Angus SC2" <a@b.com> wrote in message news:30*************@uni-berlin.de...
Hi, I am writing a little web-app in Visual Studio.NET using C# and
ASP.net.

I have a few questions about page layouts. ..

If possible I would like to be able to generate html in a string object in
the form handler and squirt it into some part of the page

Thanks
Angus

Nov 18 '05 #4

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

Similar topics

179
by: SoloCDM | last post by:
How do I keep my entire web page at a fixed width? ********************************************************************* Signed, SoloCDM
20
by: O Ransen | last post by:
Hello all, I hope you can help me. Given graphical idea for a page: http://www.ransen.com/temp/temp.htm (Large image, please be patient!) What is the best way of constructing this page...
0
by: John Bradley | last post by:
I've read and understood the w3 specs on css1 and css2. I've done some positioned layouts on my own system that worked as expected. But - I'm concerned about letting anything on to the live system...
1
by: Matt Kruse | last post by:
I've never found a function which will return me the x,y position of an object on the page reliably, cross-browser, in any type of page layout situation. So, I've been working on my own function to...
3
by: Guadala Harry | last post by:
I'm using HTML tables to define the layout of a non framed aspx page. How can I cause a page footer (html table, itself) to appear at the bottom of the page when the page content would not be...
1
by: Wayne P. | last post by:
Is there a good reference online to good page design in VS.Net? I am used to tools like DreamWeaver and GoLive that make CSS or table bases layouts a breeze. However, it appears that VS.Net lacks...
7
by: David Veeneman | last post by:
I'm just getting started with ASP.NET in Visual Studio 2005. The last web work I did involved ASP 3.0 in FrontPage. I've been through the MSDN tutorials on creating web pages, but not of them...
5
by: Stephen Poley | last post by:
There are plenty of people around these groups who promote the idea of flexible page design. However, while employing relative units and not fixing column-widths is a big improvement on...
4
by: james00 | last post by:
Switching Page Layouts!!! Does anyone have any idea how to create a script for Switching Page Layouts. I know how to create one for Style Sheet Switcher ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.