By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,438 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

Render HTML document in ASP.NET

P: n/a
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

Nov 18 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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" <an*******@discussions.microsoft.com> wrote in message
news:20**********************************@microsof t.com...
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't render the Power Point document because it uses frames.

Is there anybody who can help me?

Thanks

Alberto

Nov 18 '05 #2

P: n/a
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.

"vandalo" <an*******@discussions.microsoft.com> wrote in message
news:F2**********************************@microsof t.com...
Thanks Kevin,

but the problem is the powerpoint files and directory (saved by the conversion) is not under IIS so I have to load the main file and substitute the paths of the images and everything with a page which returns the image.
A client script loads the frameset. What can I do?
Do you have any smart solution?

Thanks

Alberto

Nov 18 '05 #3

P: n/a
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
Nov 18 '05 #4

P: n/a
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" <an*******@discussions.microsoft.com> wrote in message
news:C1**********************************@microsof t.com...
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 page

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 help

Alberto

Nov 18 '05 #5

P: n/a
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" <an*******@discussions.microsoft.com> wrote in message
news:EB**********************************@microsof t.com...
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.

Nov 18 '05 #6

P: n/a
I think I am going to rethink my application logic
Thanks ideed

Alberto
Nov 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.