Question

We have an old page written in Classic ASP that makes calls to an existing .asp page through the Prototype library's Updater object.

This call passed some query string parameters in w/ the request and received a list of params to update as well as a block of HTML/JS to render onto the main asp page.

It seems that the page lifecycle complicates things, but implementing in an actual server control or usercontrol could work.

[EDIT] I'd like to clarify/simplify the original question: Is there a way to render an ASP.NET control (.ascx or server control) in a non ASP.net page?

Ideally it would be called via AJAX and return a block of HTML Text - along with some way to transfer state to the receiving page.

Was it helpful?

Solution

You could place the control in a web service that returns the raw HTML as output and call the web service from AJAX placing the results wherever you wanted using dynamic HTML. You might have to play around with the output buffer of the control to get this to work the way you want it though.

OTHER TIPS

You could put an IFRAME into the asp that contains the aspx page and use some mechanism to pass through parameters, possibly through a QueryString Value?

The asp page could write an entry(params) into a Table, creating an ID (Guid) thats passed through to the aspx page which retreives the entry?

Assuming your webserver can run .aspx files on the target framework, then yes, you can render the RESULTS of the control / page into a classic asp page, or a plain old html page for that matter. You can't have any server-side functionality present, so you'd just be rendering the html generated results of the control/page.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top