Groups | Blog | Home
all groups > asp.net > march 2006 >

asp.net : ASP.NET 2.0 Include Files


Steve C. Orr [MVP, MCSD]
3/28/2006 2:43:42 PM
I'd suggest you make it into a user control.
Here's more info:
http://SteveOrr.net/faq/UserCustom.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


[quoted text, click to view]

Craig Deelsnyder
3/28/2006 4:29:15 PM
[quoted text, click to view]

just adding a link to an MSDN article that actually starts out with 'how
you used to do it in ASP'

http://msdn.microsoft.com/msdnmag/issues/04/06/ASPNET20MasterPages/

--
Craig
sloan
3/28/2006 5:04:05 PM
Create a master page...

and have all your other/real pages "inherit" from this MasterPage.






[quoted text, click to view]

Erik Funkenbusch
3/28/2006 5:44:49 PM
[quoted text, click to view]

You can have as many master pages as you want, and only apply them to
Juan T. Llibre
3/28/2006 6:24:36 PM
re:
[quoted text, click to view]

Write a user control.

Here's a good sample for ASP.NET 2.0 you can study and adapt :
http://www.devx.com/dotnet/Article/26609/0/page/1

The code for that article is at : http://assets.devx.com/sourcecode/11796.zip

There's a simpler ASP.NET 1.1 sample at :
http://www.dotnethero.com/hero/usercontrols/Web-Control-Library.aspx?nmx=7_2

The source for that one is at : http://www.dotnethero.com/hero/usercontrols/navmenuCode.zip



Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
[quoted text, click to view]

Kevin
3/28/2006 10:52:38 PM
Am a newbie to ASP.NET and have jumped right into 2.0.
I have a static menu (using the menu control) for just 3 pages on a 20 page
website.
I would like to put all the code in one place, as it will make maintenance
very easy.
In the good old ASP days I could use <#include ...>

What is the best way of putting my menu code in one place, available to all
3 pages, in ASP.NET???


Kevin
3/29/2006 12:23:07 AM
Thanks for all the information.
Am going to look at the UserControls.
I thought the MasterPage was a template for ALL pages, rather than just the
3 out of 20 I need?

Thanks a million to everyone.
Kevin

[quoted text, click to view]

AddThis Social Bookmark Button