Force Response.OutputStream to open application

    Date: 05/23/06 (Asp Dot Net)    Keywords: browser, database, asp, microsoft

    Ok here's the situation. I have an ASP.net app that gets a file from a database and then prompts the user to run, saveAs, or cancel the file. The code is:

    Response.Buffer = True
    Response.AddHeader("Content-Disposition", "inline;filename=" & ds.Tables(0).Rows(0).Item("reqJobDescName"))
    Response.ContentType = "application / msword"
    Response.BinaryWrite(myData)

    The problem is that if you click on Run, the file opens up in another browser. I want it to be opened by the actual program. Therefore, I don't want this to "run" on another browser window that has Microsoft Word in it. I want Microsoft Word to open up the file directly. Is there any way to do this? I have to figure there is, although perhaps it can't be done in Response since that is all based on httpResponse. Thanks.

    Source: http://community.livejournal.com/aspdotnet/67367.html

« Windows Mobile || user controls and weird shit »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home