Controling Page Layout With ASP.NET 1.1

T

Tyson

Hello All,

I was wondering what is the best/most effective way to control pay
layout when using ASP.NET 1.1. I have seen that with 2.0 you can use
some new functionality called master pages, but I have not really seen
anything in regards to 1.1

When I develop with ASP I create a file called "common.asp" that would
contain subs like "write_header", "write_footer", "write_sidebar", etc.
that would contain the HTML for the basic layout of my page. Then when
I created a page it would look something like this:

Index.asp
call write_header
call write_sidebar
call write_body
call write_footer

sub write_body()
<page specific info here>
end sub

Can I do something similar with ASP.NET? Is that the best way to
control layout? I had a horrible web development teacher in college
and books (or at least the ones I have seen) really don't cover this
kind of thing.

Any advice, tips, URLs, slaps upside the head asking what in the world
are you thinking :) would be greatly appreciated.


Thanks in advance

Tyson
 
T

Tarren

use usercontrols for 1.1

I usually have ucHeader.ascx and ucFooter.ascx which encapsulate each page
nicely.

Each usercontrol has its own codebehind so you can have logic, etc in the
usercontrols if you want menu structure, or anything in them to be dynamic.

Programatically you can work with objects on them too, but you would have to
declare in code to work with methods in them instead of just normal markup
if you wanted to expose methods and properties ont he user controls
themselves.
 
T

Tyson

Thanks for your help and the info. This looks like it will work very
similar to what I am used to doing in ASP.

Thanks,

Tyson
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top