Question found elsewhere

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Lee Wrote :
Do you know if/how you can open a file say a txt or doc from a asp.net page that opens the file say a word document in word but not word within the IE browser. word as a application and will allow you to save any changes. this is for running over a intranet so if you click on the doc file link in IE it would open the file in the default application and you could save it as if you had clicked on it through my computer.

Picked this question up in another board. (Miss posted I think; ) )
 
Lee,

You can force the download or opening of the file outside of IE by
attaching the "content-disposition" header to your response. The code looks
like this:

// Add the content disposition header.
Response.AddHeader("content-disposition", string.Concat("attachment;
filename=", <filename>));

Note that <filename> is the suggested filename that will appear in the
"Save As" dialog box if the user opts to save the document.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

DigitalSpectre said:
Lee Wrote :
Do you know if/how you can open a file say a txt or doc from a asp.net
page that opens the file say a word document in word but not word within the
IE browser. word as a application and will allow you to save any changes.
this is for running over a intranet so if you click on the doc file link in
IE it would open the file in the default application and you could save it
as if you had clicked on it through my computer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top