Hi WebMasterSam, i do have control of the clients as i have intranet installed...but....i did not fully understand the solution sited by you....could you please site an example??
i always wonder how people are able to embed all the forms over the sites and they are over the internet...do they also use some kind of script to open the word docs? i have much to learn!! hope to hear from u soon!! thank you for ur prompt reply! regards, Arun ----- Original Message ---- From: webmastersam2 <[EMAIL PROTECTED]> To: [email protected] Sent: Monday, April 30, 2007 7:05:19 AM Subject: [AspNet2] Re: embedding word document in an ASP.NEt web page using c# Hi Arun, I've ran into something like that a few months ago. To open a word document embedded in IE, you have to configure the client computers (IE) to have that behavior. If you can control all the client computers, just write a startup script that runs when XP boots up. If you can't control the clients (because your not in an intranet), you will not be able to achieve exactly what you want easily... If the only thing you want is to automatically open word with the right document, you can use "word automation" (if you don't know that, I can explain further on). But using automation will prompt word in a new window, not embedded in the web browser... For my purpose, I always use automation when I need to open word automatically. WebMasterSam --- In [EMAIL PROTECTED] .com, "Arun" <darun_arora@ ...> wrote: > > Hi, > > i have the following code written for embedding a word document in a > web page everything is ok but i do not want it to promt for saving > the file...i just wat it to display word file in the browser > itself....so far with this code i am not able to achieve it....it > still prompts...please help.. > > Thanks in advance!! > > Arun > > here is the code: > > string filepath = Server.MapPath( "IE.doc") ; > FileInfo file = new FileInfo(filepath) ; > if (file.Exists) > { > Response.ClearConte nt(); > Response.ClearHeade rs(); > Response.AddHeader( "Content- Disposition" , "inline; filename=" + > file.Name); > Response.AddHeader( "Content- Length", file.Length. ToString( )); > Response.ContentTyp e = "application/ ms-word"; > Response.WriteFile( file.FullName) ; > Response.Flush( ); > Response.End( ); > } __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed]

