Print Page | Close Window

Server Side Includes

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=7081
Printed Date: 29 March 2026 at 12:06am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Server Side Includes
Posted By: IrishNewbie
Subject: Server Side Includes
Date Posted: 07 November 2003 at 10:39am

Guys,

Whats the easiest way to have the top and left hand side of a page included in your aspx file??? Ive tried using server-side includes but cant seem to get it right.

 




Replies:
Posted By: MorningZ
Date Posted: 07 November 2003 at 10:43am

User http://www.15seconds.com/issue/020319.htm - "UserControls"  instead of SSI is the ".NET way"

 



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Mart
Date Posted: 07 November 2003 at 10:57am

I would recommend using User controls aswell. But if you really need to use SSI:

<!--#include file="thefile.aspx"-->



Posted By: MorningZ
Date Posted: 07 November 2003 at 11:05am

i wouldn't even remotely recommend using SSI anymore.. all comes down to:

if you are going to learn .NET, then code in .NET

User controls are a whole nuther world.. they are replacable/selectable (unlike SSI and how many posts do we see with: "how can i selectively include files" in which the answer is always: you can't), plus they are cachable (<<== very killer stuff, and if you want more info, i can give it)



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Mart
Date Posted: 07 November 2003 at 11:12am
No i dont need info, i already use them. I was just giving him the option just incase he wants to use SSI for some reason.


Posted By: MorningZ
Date Posted: 07 November 2003 at 11:14am
that was meant for him

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Mart
Date Posted: 07 November 2003 at 11:27am
oops


Posted By: IrishNewbie
Date Posted: 07 November 2003 at 1:28pm
thanks guys, i can see myself using this site an awful lot over the next few months!!!!!!!!


Posted By: dpyers
Date Posted: 08 November 2003 at 2:22am

Originally posted by IrishNewbie IrishNewbie wrote:

thanks guys, i can see myself using this site an awful lot over the next few months!!!!!!!!

Forgive him Lord, for he knoweth not where his path leadeth him



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: IrishNewbie
Date Posted: 09 November 2003 at 6:41am

I've been looking at sites about User Controls but was wondering if someone could give me an explanation of them in their own words and maybe point me in the right direction for using them to include a top and left hand side on every page.

 



Posted By: Bunce
Date Posted: 10 November 2003 at 9:07pm

Another alternative if you want to include some common functionality in every page, is create a custom page class which inherits from system.web.ui.page.  Place your common code in this class.

You then create all your pages to inherit from this custom class, rather than system.web.ui.page.

Very nifty for user tracking, exception handling etc..

Cheers,
Andrew



-------------
There have been many, many posts made throughout the world...
This was one of them.


Posted By: wistex
Date Posted: 08 December 2003 at 1:42am
Originally posted by MorningZ MorningZ wrote:

I wouldn't even remotely recommend using SSI anymore... all comes down to:

if you are going to learn .NET, then code in .NET

User controls are a whole nuther world.. they are replacable/selectable (unlike SSI and how many posts do we see with: "how can i selectively include files" in which the answer is always: you can't), plus they are cachable (<<== very killer stuff, and if you want more info, i can give it)

 Yeah, I wish it was that simple.  We have this problem where we have hundreds of pages in ASP, and all our headers and footers are ASP includes, and then we hired a developer to create something for our site... and he decided to write it in ASP.NET... even though our site is in ASP!

It's been a nightmare trying to get ASP and ASP.NET on the same page.  We finally figured out how to do it, but it wasn't obvious at all.  We actually have to call the ASP header and footer, and then insert the results of the call into the ASP.NET page.  A weird way of doing it, but it works.

( Here's the link BTW:
http://authors.aspalliance.com/stevesmith/articles/netscrape .asp )

We don't have the time or the manpower to maintain an ASP header and footer and also a ASP.NET header and footer for the same website, much less rewrite all the ASP stuff.

But at least the nice thing about all this is that now we can use the same technique to put an ASP header and footer around a Perl Script!  We just have to make the perl script an ASP.NET page and then use the technique explained in the link above.

I already have plans on converting a couple perl scripts to ASP.NET so we could include our ASP headers and footers.

I know that is not how we are supposed to do it, but we are not going to rewrite our entire website.



-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: Diep-Vriezer
Date Posted: 08 December 2003 at 1:47am
It does slows a bit down, since more DLL's are called (my theory). Anyway, if it works,

-------------
Gone..


Posted By: wistex
Date Posted: 08 December 2003 at 1:59am

Originally posted by Diep-Vriezer Diep-Vriezer wrote:

It does slows a bit down, since more DLL's are called (my theory). Anyway, if it works,

It was either that or make him rewrite it in ASP.  And we have a deadline, so that wasn't really an option either.  And our preliminary tests seem to work out fine with this method.  We may eventually come up with a better solution, but we are kinda under the gun.



-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: Diep-Vriezer
Date Posted: 08 December 2003 at 7:03am

Haha, well it works alright, and you can always rebuild it again, maybe in .NET.



-------------
Gone..



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net