design challange with asp.net - ok with other technols..

  • Thread starter Thread starter Oliver
  • Start date Start date
O

Oliver

hi -
I'm now a .NET convert - having come from the Perl world...
I've been doing/thinking asp.net for a while, but am still not
happy two things in particular - any advice/opinion appreciated:

1) it seems difficult to abstract 'page level' coding. eg - nav bars -
I would like to split the page into three areas using tables to house:
top level nav, left nav, and page content - however - *I do not want
the code for this table, or the nav bars, or any code to call in nav
bars to be duplicated on each .aspx page*. In fact I only want *one
instance of the string '<HTML>' on the whole site* - this will
probably fill tradational ASPers with confusion/anger etc - but it's
important... I'll explain why later ;)

2) Visual Studio's lack of support for 'sub-applications' - ie
applications that live in sub-directories of virtual directories, and
inherit config etc from all applications above them. - this is
*possible* in ASP.NET, but awkward.

thanks all,
Oliver.
 
Hi,

You can achieve part of this behavior by using user controls that
encapsulate visualization and code for every bar. the next asp.net
version will support exactly what you want by using "Master pages".

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
Hi,
You're not going to be able to have one unique instance of <html> on your
entire site as each ASPX page needs opening and closing <html> tags to be a
well-formed page.

You would probably have the same restrictions with Perl as each script needs
to output correctly formed HTML in order to be rendered correctly. This is a
requirement of the HTML standards, not ASP.NET.

Your layout can be taken care of by using User Controls (ASCX) files for
each chunk of the page, and simply having a basic table framework in the
ASPX files to display the ASCX's at the correct locations.

If code needs to be run on every page to populate your user controls, look
at subclassing the Page class to create a custom Page base class that
includes all the necessary calls by default. This will mean your individual
ASPX pages can simply inherit from "mycustomclass" rather than Page, and
automatically include the code necessary to setup your controls.
 
You're not going to be able to have one unique instance of said:
entire site as each ASPX page needs opening and closing <html> tags to be a
well-formed page.

I think this may be *possible* - one page on the site could have the
'<html>' tags, and all the others could be called in with
Server.Execute as required. I'm not 100% sure this'll work though...

I like the sound of these 'master pages' though - fingers crossed.

I think this all makes it touch to have a well designed *large*
web-site - pointers to design ideas for large asp.net sites
appreciated.
 
Back
Top