473,856 Members | 1,806 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3254
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*******@disc ussions.microso ft.com> wrote in message
news:20******** *************** ***********@mic rosoft.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*******@disc ussions.microso ft.com> wrote in message
news:F2******** *************** ***********@mic rosoft.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.Cur rent.Response.C lear(
HttpContext.Cur rent.Response.C learHeaders(
HttpContext.Cur rent.Response.C learContent(

srFileHtml = File.OpenText(< html file to load>
_BufferHtml = srFileHtml.Read ToEnd(
srFileHtml.Clos e(

HttpContext.Cur rent.Response.C ontentType = "text/html
HttpContext.Cur rent.Response.W rite(_BufferHtm l
HttpContext.Cur rent.Response.F lush(
HttpContext.Cur rent.Response.E nd(

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*******@disc ussions.microso ft.com> wrote in message
news:C1******** *************** ***********@mic rosoft.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.Cur rent.Response.C lear()
HttpContext.Cur rent.Response.C learHeaders()
HttpContext.Cur rent.Response.C learContent()

srFileHtml = File.OpenText(< html file to load>)
_BufferHtml = srFileHtml.Read ToEnd()
srFileHtml.Clos e()

HttpContext.Cur rent.Response.C ontentType = "text/html"
HttpContext.Cur rent.Response.W rite(_BufferHtm l)
HttpContext.Cur rent.Response.F lush()
HttpContext.Cur rent.Response.E nd()

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*******@disc ussions.microso ft.com> wrote in message
news:EB******** *************** ***********@mic rosoft.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
2202
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 ServiceName (attribute name), under I have to show all the other fields with correct structure. Can you help me to write XSLT document? My XML doc:
0
1817
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 System.Web.UI; public class PageBase : System.Web.UI.Page {
9
2153
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 value="1996">1996</option> <option value="1997">1997</option> <option value="1998">1998</option> <option value="1999">1999</option> <option value="2000">2000</option>
6
1621
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 difference is absolutely annoying and unacceptable.
1
1421
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 changed everything I can think of on the page and it's still not right. Here's the cut down html if anyone will please look at it. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
5
1786
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
2457
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 rendered as a page (or actualy a part of a page) that is editiable. To do this I let the user download the document, edit it and then upload it back to the site. Then at Page_Open, I convert the .doc file to an html and render it back to the page......
5
3842
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 show various countries appearing to be depressed when "moused-over". To keep it simple at first, I just decided to try two countries. After copying the HTML and JavaScript codes generated by ImageReady into the page I wanted to insert the map into,...
4
2478
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 suspect some permissions problem. I'm running VS.NET 2008 in Vista. Symptoms and observations: * ASP.NET's native ImageMap and Image controls work just fine and provide a design-time preview of images that are referenced via the ImageUrl property *...
0
9762
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11055
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10696
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10383
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7932
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7093
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5761
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5958
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4575
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.