Render HTML document in ASP.NET

G

Guest

Hi all

I developed a service which can convert an office document (word, excel, powerpoint
into HTML and save it on the file system
To do this I use the "save as" functions of the office applications
Word, Excel and PPT create a folder which contains all the support files for the document

My ASP.NET application should then get the HTML document (load it from the disk) and render it into the browser
I don't have problems with Word and Excel documents - even if they contain images - but I can'
render the Power Point document because it uses frames

Is there anybody who can help me

Thanks

Albert
 
K

Kevin Spencer

Sure, you can render the PowerPoint document. Just render the frameset
document. The frames should load by themselves.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

vandalo said:
Hi all,

I developed a service which can convert an office document (word, excel, powerpoint)
into HTML and save it on the file system.
To do this I use the "save as" functions of the office applications.
Word, Excel and PPT create a folder which contains all the support files for the document.

My ASP.NET application should then get the HTML document (load it from the
disk) and render it into the browser.
 
K

Kevin Spencer

You lost me when you said "A client script loads the frameset." What do you
mean by that? In your first message you indicated that the documents were
all saved on the server as HTML files.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
G

Guest

Ok, I am sorry ... I'll try to explain better
If you get a PPT file and save it to the disk using the "save as web page..." you have the main page and a folder which contains all the support files.
The main HTML page contains a client-script (javascript) which loads a frameset.
I have a services which does this conversion on another machine (which is not the web server) and save those files on the filesystem
My ASP.NET application use a page which loads the HTML file and render it to the browser
If the HTML page to render has no other support files everything works fine but, when I have other scripts or HTML pages involved, I
can't render

My ASP.NET pag

HttpContext.Current.Response.Clear(
HttpContext.Current.Response.ClearHeaders(
HttpContext.Current.Response.ClearContent(

srFileHtml = File.OpenText(<html file to load>
_BufferHtml = srFileHtml.ReadToEnd(
srFileHtml.Close(

HttpContext.Current.Response.ContentType = "text/html
HttpContext.Current.Response.Write(_BufferHtml
HttpContext.Current.Response.Flush(
HttpContext.Current.Response.End(

Thanks in advance for your hel

Alberto
 
K

Kevin Spencer

Well, it sounds like all of your problems can be solved by simply having
your utility store the files it creates in a folder on your web server.
Since the links in it are all relative, they should work fine, as long as
the relative positions of the files remain the same, unless the links begin
with "file://" in which case you could easily search and replace such links
with proper links.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

vandalo said:
Ok, I am sorry ... I'll try to explain better.
If you get a PPT file and save it to the disk using the "save as web
page..." you have the main page and a folder which contains all the support
files.
The main HTML page contains a client-script (javascript) which loads a frameset.
I have a services which does this conversion on another machine (which is
not the web server) and save those files on the filesystem.
My ASP.NET application use a page which loads the HTML file and render it to the browser.
If the HTML page to render has no other support files everything works
fine but, when I have other scripts or HTML pages involved, I
 
K

Kevin Spencer

Well, you've got quite a conundrum there, vadalo! I think I would have to
know more about the workflow before I could recommend a solution.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

vandalo said:
I don't want the users to access directely my documents that's why I am
using a page who checks the user's permissions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top