简体   繁体   中英

Running classic ASP on ASP.net page

I have a classic ASP forum, I'd like to use a master page and contain the forum inside it. Is this possible without frames?

There are two strategies you could use to avoid frames.

Ajax.

There are two ways you could use ajax to do this. One would be to use ajax to get forum contents to populate master page. The other would be to put the ajax call to generate the page template "wrapper" in the classic asp forum code to call you asp.net app to generate the page template. Essentially both are putting the pieces together on the client side.

Proxy method.

Similar strategy but doing the putting together on the server side... Utilize your aspx pages to make a call (webrequest) to your classic asp page, essentially proxying the call to the actual asp page and then consume the returned HTML on the server side and render it utilizing the master page.

Neither are great solutions... the ajax method I would argue against and just use an iframre. The proxy method is a bit more complicated but would get rid of the frame.

You could perhaps use an inline frame (iframe) to hold your forum. You'll still need a dedicated content page with the html for the iframe.

Create a hidden iframe with the the forum inside of it. Get the document element from the iframe window using javascript and put the contents of the document element inside a div on the master page.

On each event in the document element of the iframe, reload the div.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM