[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Can you include .aspx pages within classic ASP pages?

Posted on 2008-02-12
4
Medium Priority
?
1,386 Views
Last Modified: 2013-11-07
Have a server running classic ASP and .NET websites.

Have one particular website that is all classic ASP.

Developing new sections to this in .NET - they will be standalone, but 'part' of the site.

There may be some functionality from the new .NET site that I would like to use in the ASP site.  Can i simply include an .aspx page to run that .NET code in the same way that I include other ASP or HTML pages?

In other words, with IIS process the .aspx using the .NET runtime, and the main ASP page as normal, or will it include the contents of the .aspx then process all that as ASP and crash.

I think that explains what I may want to do!
0
Comment
Question by:Rynert
  • 2
4 Comments
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 260 total points
ID: 20876873
Rynert,

It should crash.  The include in ASP adds the code and then processes the "lump" of code.  Include files aren't processed first and then added.  This would cause errors since the ASP engine would attempt to process your ASP.NET code.

Let me know if you have any questions or need more information.

b0lsc0tt
0
 
LVL 6

Assisted Solution

by:Arlowin
Arlowin earned 240 total points
ID: 20890624
You could try an Iframe, I know its not ideal, but many times .net apps will work fine in an Iframe.  

Just be aware that you may have issues with ajax, cookies, sessionstate etc.  

And the code would not be interactive with the asp page, just displayed within it.

Just have to try and see.

Beyond that if you just want to call .net code from within asp, there are ways to do this. One straight forward example can be found here: http://www.devsource.com/c/a/Using-VS/Calling-Net-Classes-from-Visual-Basic-6/
0
 

Author Comment

by:Rynert
ID: 20891679
Thanks for the answer and alternative suggestions - I think I will just have to code the bits I want to use on the old site, the old way!
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 20896630
Your welcome!  I'm glad I could help.  Thanks for the grade, the points and the fun question.

bol
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
The PowerShell Core 6.0 of .NET release is just the beginning. The upcoming PowerShell Core 6.1 would have artificial intelligence and internet of things capabilities. So many things to look forward to in the upcoming release.
The video provides a quick and easy steps to migrate MBOX file to well known Outlook PST and Office 365. Besides this, it also supports and migrates more than 20 email clients of MBOX which include AppleMail, Opera, Thunderbird and SeaMonkey effortl…
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
Suggested Courses
Course of the Month8 days, 15 hours left to enroll

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question