Handling website structure

I

Imran Aziz

Hello All,
I want to develop a website that has three panels, the left and right
panel needs to include code from common or other sections then the middle
panel. Now in ASP the way we use to do it , was include the site structure
in include files, like site header, site navigation in an include file and
then include it over the entire website. How can something similar be
achieved in ASP.net? what is the best way to go about it ? Any pointers
please.

Thanks a lot.

Imran
 
G

Grant Merwitz

The best way to handle this would be Master Pages in .NET 2.0
But if you need this designed pronto, and can't wait for that, the two best
solutions i've found:

1)
Make your header and left nav two controls.
Then on all your pages (or in your Global at runtime), add these into the
page like follows

<html>
<body>
<table>
<tr>
<td colspan="2">
<!--HEADER CONTROL HERE-->
</td>
</td>
<tr>
<td>
<!--NAV CONTROL HERE-->
</td>
<td>
<!--CONTENT HERE-->
</td>
</td>
</table>
</body>
</html>

2)

<html>
<body>
<table>
<tr>
<td colspan="2">
<!--HEADER CONTROL HERE-->
</td>
</td>
<tr>
<td>
<!--NAV CONTROL HERE-->
</td>
<td>
<asp:panel id="pnl></asp:panel>
</td>
</td>
</table>
</body>
</html>

You can then session/querystring which control you calling, and add that
into the Panel at run time (this I use as a work around untill I can Master
Pages, as that is essentially this with alot less effort)

Create a control for every section in your site.
Then you need one Main page, and a panel you can dynamically load the
content into.
So like this:
 
I

Imran Aziz

Hello Grant thanks a lot for your response.
Hum does not seem to be an easy solution, but I guess that is the case,
where can I get more details about the Master Pages, I am using .net beta 2
latest version so I might as well use the Master Pages rather then controls.
cause I am pretty new to ASP.net in general, so learning curve I think
should be the same.
Imran
 

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

Top