Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,837 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,550 people online right now. Registration is fast and FREE... Join Now!




ppt inside asp.net

 
Reply to this topicStart new topic

ppt inside asp.net

kumanan.c
22 Sep, 2008 - 09:52 PM
Post #1

New D.I.C Head
*

Joined: 10 Jul, 2008
Posts: 1

i need to design a webpage using (asp.net with c#) to import a ppt file. if u know that solution then pls send me immediately.

This post has been edited by kumanan.c: 22 Sep, 2008 - 09:53 PM
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Ppt Inside Asp.net
22 Sep, 2008 - 10:07 PM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,997



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.
User is offlineProfile CardPM
+Quote Post

Sonic88
RE: Ppt Inside Asp.net
24 Sep, 2008 - 06:13 AM
Post #3

D.I.C Head
**

Joined: 19 Feb, 2008
Posts: 166



Thanked: 2 times
My Contributions
I have actaully been working on something like this for a while. You have to set your headers of a dummy page and then set that as the src of IFRame in your parent page. I can not for the life of me get the thing to open inside the page. It always wants to open powerpoint, or excel (depending on file type) and open the file inside the app. My boss insists on it opening in the page.

vb


'test for session data to prevent exception when app hits this twice
If Not Session("fileName") Is Nothing And Not Session("mimeType") Is Nothing Then
'get the filename and mimetype from session
Dim fileName As String = Session("fileName").ToString
Dim mimeType As String = Session("mimeType").ToString

Dim path As String = Server.MapPath(Common.materialPath)
Dim file As System.IO.FileInfo = New System.IO.FileInfo(path + fileName)

If file.Exists Then
'if file exists, set the header info
Response.Clear()
Response.ContentType = mimeType

Response.AddHeader("Content-Disposition", "inline; filename=" & file.Name)
Response.AddHeader("Content-Length", file.Length.ToString())

Response.WriteFile(file.FullName)
Response.End()
End If
End If


It is my understanding that the "inline" in this line:
Response.AddHeader("Content-Disposition", "inline; filename=" & file.Name)
is to make it open in the page. Psycho do you have any ideas on this?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/3/08 04:44PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month