473,387 Members | 1,541 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,387 software developers and data experts.

Formatting pages

In classic asp, I would have my standard page format in an include file,
which I would include on every page. Thus, the whole site has a consistent
look and can be changed through one file.

How do people do this in asp.net? I've been told that I'd need to create a
class inheriting from the Page class. That seems like overkill to me. Is
there a better approach.

Thanks
TomB
Nov 18 '05 #1
4 868
You can create a user control (.ascx file) which is the ASP.NET replacement
for include files.

"TomB" <sh*****@hotmailXXX.com> wrote in message
news:uM*************@TK2MSFTNGP09.phx.gbl...
In classic asp, I would have my standard page format in an include file,
which I would include on every page. Thus, the whole site has a consistent look and can be changed through one file.

How do people do this in asp.net? I've been told that I'd need to create a class inheriting from the Page class. That seems like overkill to me. Is
there a better approach.

Thanks
TomB

Nov 18 '05 #2
So if you want to change the look of your page, you have to manipulate each
page?

For example, if you have a "menu" user control on the left hand side, and
decide to go with a horizontal menu along the top. You not only have to
change the user control, but move it on each page?

Thanks Rick
"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
You can create a user control (.ascx file) which is the ASP.NET replacement for include files.

"TomB" <sh*****@hotmailXXX.com> wrote in message
news:uM*************@TK2MSFTNGP09.phx.gbl...
In classic asp, I would have my standard page format in an include file,
which I would include on every page. Thus, the whole site has a consistent
look and can be changed through one file.

How do people do this in asp.net? I've been told that I'd need to create a
class inheriting from the Page class. That seems like overkill to me.

Is there a better approach.

Thanks
TomB


Nov 18 '05 #3
You could make that a property of the user control, so that you could tell
it how to lay out. For example, a datalist can do that for you.

"Tom B" <sh*****@NOSPAMhotmail.com> wrote in message
news:uu****************@TK2MSFTNGP10.phx.gbl...
So if you want to change the look of your page, you have to manipulate each page?

For example, if you have a "menu" user control on the left hand side, and
decide to go with a horizontal menu along the top. You not only have to
change the user control, but move it on each page?

Thanks Rick
"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
You can create a user control (.ascx file) which is the ASP.NET

replacement
for include files.

"TomB" <sh*****@hotmailXXX.com> wrote in message
news:uM*************@TK2MSFTNGP09.phx.gbl...
In classic asp, I would have my standard page format in an include file, which I would include on every page. Thus, the whole site has a

consistent
look and can be changed through one file.

How do people do this in asp.net? I've been told that I'd need to create
a
class inheriting from the Page class. That seems like overkill to me.

Is there a better approach.

Thanks
TomB



Nov 18 '05 #4
Thanks again,

I found an old article in Visual Basic Programmer's Journal that talks about
using Page Templates. I haven't read it yet, but I think I'll have a peek
at that.

Thanks for your help
TomB

"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:eA**************@TK2MSFTNGP12.phx.gbl...
You could make that a property of the user control, so that you could tell
it how to lay out. For example, a datalist can do that for you.

"Tom B" <sh*****@NOSPAMhotmail.com> wrote in message
news:uu****************@TK2MSFTNGP10.phx.gbl...
So if you want to change the look of your page, you have to manipulate

each
page?

For example, if you have a "menu" user control on the left hand side, and
decide to go with a horizontal menu along the top. You not only have to
change the user control, but move it on each page?

Thanks Rick
"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
You can create a user control (.ascx file) which is the ASP.NET

replacement
for include files.

"TomB" <sh*****@hotmailXXX.com> wrote in message
news:uM*************@TK2MSFTNGP09.phx.gbl...
> In classic asp, I would have my standard page format in an include file, > which I would include on every page. Thus, the whole site has a
consistent
> look and can be changed through one file.
>
> How do people do this in asp.net? I've been told that I'd need to

create
a
> class inheriting from the Page class. That seems like overkill to

me. Is
> there a better approach.
>
> Thanks
> TomB
>
>



Nov 18 '05 #5

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

Similar topics

4
by: Rob Meade | last post by:
Hi all, Ok - this leads on from speaking to a couple here and in the SQL server group... I've an application which allows the user to type in their text into a form, they add 'happy' tags...
163
by: Shiperton Henethe | last post by:
Hi Know any good utilities to help me strip out the tags that Microsoft Excel 2002 leaved behind when you try and export an HTML format file? This is driving me NUTS. And really makes me...
0
by: sonic_soul | last post by:
silly, but i thought i disabled auto formatting in Options > Text Editor > HTML/XML > Format > Apply automatic formatting. after creating a huge aspx page maticulously formatted i switch to...
2
by: Eddy Bee | last post by:
Hi there, I'm encountering an inexplicable problem with page formatting in reports. Here's the easiest way to explain it: The Detail section of my report contains two elements: And let's...
4
by: Arthur Dent | last post by:
Hello all, ive been programming with ASP.NET since it came out, but am just getting my feet with now with v.2. Ive noticed something strange in the way my HTML tables get rendered with 2. I use...
25
by: mdh | last post by:
Hi Group, Not looking for an answer, but more of an explanation. Thinking back to those heady days when you had the time to do them, may I ask this. Exercise 1-22 asks for a program to "fold"...
11
by: Bazza Formez | last post by:
Hi, I have an app which utilizes forms security. I have a Login.aspx page which references my MasterPage.master. The master page in turn references a css. In the designer of VS 2005, the...
5
by: dancole42 | last post by:
I have a question regarding the DoCmd.OutputTo function. I have an invoice report that shows all of the invoices for a particular date. I want to create a button that will export each page of...
3
by: =?Utf-8?B?b24tbGluZSBqb3VybmFsIGVkaXRvcg==?= | last post by:
I can't seem to cut-and-paste text, with either .doc or .html formatting, into my .asp web-pages --all the formatting is lost. Is there some code that needs to be added to the page that will...
13
by: cj2 | last post by:
pages = 1 pages.tostring gives me "1" pages+1.tostring gives me "2.0" Why did it add the ".0" on there? I was looking for "2" and this screws me up. Actually this is what I was doing. In...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.