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

Join 132,324 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,101 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
post 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

Go to the top of the page

PsychoCoder
post 22 Sep, 2008 - 10:07 PM
Post #2


using DIC.Core;

Group Icon
Joined: 26 Jul, 2007
Posts: 8,923



Thanked 118 times

Dream Kudos: 8475

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

Go to the top of the page

Sonic88
post 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

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 02:40AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month