Monday, March 26, 2012

Suggestion regarding Top/footer includes

Hello,

I have the following situation. On all of my pages I would like to include a top and footer ascx file. Therefore I created two user controls. Now the the top.ascx contains another usercontrol which is a menu and shown in a table and each link in that menu is seperated with a line break. Somethin like this:

link1
link2
link3
...

Now this menu is in a table. The table looks like this:

<table width="100%">
<tbody>
<tr valign="top">
<td width="15%">
MENU HERE
</td>
<td>
CONTENT WILL BE HERE
</td>
</tr>
</tbody>
</table
Now I need to get rid of everything what comes after the MENU HERE <TD>, because this will be used for my main content. and the table will be closed then in the footer. However webmatrix always adds the missing html tags and therefore my table always looks like shown above. I hope that you guys understand what I mean. Is there anything I can do or is this is the wrong way?

ThanksI recommend that you use MasterPages, where you place the footer/header in that template.

Regards.
Arent MasterPages only in 2.0? I am using 1.1.
Nop, try to download this forum code and see how master pages are being used.

regards.
Thanks haider_balal,

I can imagine that the code for this forum is complicated and that it contains a lot of stuff. Isnt there an easier article which explains master pages in 1.1?
Hello, try to check this and give me your opinion:

MasterPages Templating Framework

regards.
2.0 will be so much fun
Why wait till asp.net 2.0 ? We can still use it in 1.1 !!!!!

regards.

0 comments:

Post a Comment