473,387 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Render HTML document in ASP.NET

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
6 3222
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
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
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
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
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
I think I am going to rethink my application logic
Thanks ideed

Alberto
Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sylvia | last post by:
Hi, I'm trying to render a XML structure to HTML using XSLT. My XML describe the header of a table with a complex and not linear structure. The first row of the header table always contains the...
0
by: boy | last post by:
Hi all, I have created a simple template class as follow, but i encountered memory leakage on the base.Render(writer). Have all you of encountered the same problem? using System; using...
9
by: Gianni | last post by:
I have to insert in a html select the last 10 years <select name="year" onChange="month()" size=5> <option value="1994">1994</option> <option value="1995">1995</option> <option...
6
by: Paul Thompson | last post by:
In NN/FF/Moz, it takes 20 sec to render a page from a file of 330 KB. It takes less than 1 sec to render that file in IE. Is there some tweak that I can make on NN to alter this? The...
1
by: Zambien | last post by:
Well, it's been about a week and I still can't figure this problem out. I've cut the html down to it's bare minimum and when I click on the select buttons in NS, the table gets all skewed. I've...
5
by: sk | last post by:
Hi, I'm trying to override the Render method of my Page class. Are there any standard guidelines for this? Thanks. Shardul
7
by: SteveM | last post by:
I am sure this is an easy question, but being relatively new to ASP.NET programming, I can not quite grasp what I need to accomplish what I need to do. What I have is a word document that is...
5
by: NuberSteve | last post by:
I'm very new to using CSS and also the concept of slices for mouse-overs, and have made my first attempt at using ImageReady to generate slices of a world map. I basically wanted a map that would...
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.