开发者

Running classic ASP on ASP.net page

开发者 https://www.devze.com 2023-02-12 19:17 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消