Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including .asp file into html file

How can include .asp file inside of html file and have it proccessed besides having to process all html files with asp.

like image 832
Boris Smirnov Avatar asked May 21 '26 12:05

Boris Smirnov


2 Answers

you could use an IFRAME tag...but it's a bit sucky. I'd do what Phantom Watson says.

like image 95
bchhun Avatar answered May 24 '26 16:05

bchhun


I'm not totally sure what you're asking. If you're attempting to include a .asp file into a .html file, I don't believe it's possible. If you change your file's extension to .shtml, then you can put the following line into the HTML file:

<!--#include virtual="path to asp file/include-file.asp" -->

Now, whether or not the ASP would be parsed or the code will be displayed will have to be addressed by someone that understands server parsing better than me.

What would be a better solution is to just include an ASP file into another ASP file. If you want functionality like page-including, then giving your files .html or .shtml extensions will only make it harder to accomplish what you're trying.

Basically, use .asp for files that you want parsed and .html for files that can be served up to the user as-is.

like image 38
Phantom Watson Avatar answered May 24 '26 16:05

Phantom Watson