Using text output from .dll for webpage

Aquila
01-03-2007, 12:37 PM
I recently aquired a contract to pick up where another company left off in their development work.

Problem is I've inhereted a holy mess, one of the problems is I don't have source code for some of the existing libraries, nor the time to develop replacements (this is a "quick fix, get it running now" thing)

In one such instance I have a library that outputs via one of it's properties a complete webpage - report.

the property name is "HTMLReport" and it includes everything for a stand alone web page. From what I hear it's original intent was to save the file every time and upload it to the server.

What I'm wondering is if I could do something in asp.net 2.0 like I would have done in old style ASP.. and this is to just response.write obj.HTMLReport from the main sub and be done with it. However, I think asp.net 2.0 puts it's own headers and the like in it.

Advice on the best way to do this?

wayneph
01-04-2007, 07:16 AM
Best way? Rewrite the DLL. ;)

Workable Solution: Use Resonse.Write in the Page.Init() event, and call Response.End. That will prevent the page's default render method from ever firing, so none of the page's other code will ever be seen.

You could also have it return to a variable, and then parse out the data between the <body> tags. Then just assign that to a Literal Control in you 2.0 page. Personally, I'd probably go this route.

Aquila
01-04-2007, 07:20 AM
I'd love to parse out the body tag, but theres so much crupus (crap) in the header of the HTML page and an embedded <style> in the header, plus enough meta tags to kill a donkey. It's an ugly ugly thing but it's what I have to use.

Oh, and thanks! as always your tops.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum