View Single Post
  #6 (permalink)  
Old March 22nd, 2006, 03:56 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Yeah, the last code I posted was for ASP 3, not .NET

Technically, you can use ASP includes in an ASP.NET page, but for not more than simple UI stuff (that is, HTML).

However, I don't recommend to do that. There are much better alternatives to ASP includes in .NET (Master Pages, User Controls and so on), so you should stay away from old skool includes.

Also, you cannot share code like this. .NET code is (partially) compiled at design time while ASP code is interpreted at run-time. Besides this, there are many other reason why this wouldn't work (the syntax problem you run into is one of them).

So, bottom line: duplicate the code for both platforms. Alternatively, you could move some of your shared code to a VB DLL or a .NET assembly and use one of them in both platforms. Not an easy undertaking, could result in odd behavior (components having references to things like Response and so on) but it'll work.

My recommendation: duplicate the code in both platforms...

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote