N
nak
Hey there,
I'm sending a file to the remote pc via web service call. I am doing
this via the following code,
HttpContext.Current.Response.ContentType =
"application/mycustommimetype"
HttpContext.Current.Response.AddHeader("Content-Disposition",
"attachment; filename=somefilename.pop")
HttpContext.Current.Response.AddHeader("Content-Length",
mystring.Length.ToString())
HttpContext.Current.Response.Write(mystring)
HttpContext.Current.Response.Flush()
HttpContext.Current.Response.End()
This works, but at current IE is giving me the option to either Open it
or Save it. I would like automatically open it, in the same way that
Windows Media Player opens an mp3 automatically when clicked on a page.
Is this down to my ContentType? I did try "application/octet-stream"
but this kept telling IE that the file was a HTML document, when it isn't so
it would only open it in the browser, or save it.
Many thanks in advance!
Nick.
I'm sending a file to the remote pc via web service call. I am doing
this via the following code,
HttpContext.Current.Response.ContentType =
"application/mycustommimetype"
HttpContext.Current.Response.AddHeader("Content-Disposition",
"attachment; filename=somefilename.pop")
HttpContext.Current.Response.AddHeader("Content-Length",
mystring.Length.ToString())
HttpContext.Current.Response.Write(mystring)
HttpContext.Current.Response.Flush()
HttpContext.Current.Response.End()
This works, but at current IE is giving me the option to either Open it
or Save it. I would like automatically open it, in the same way that
Windows Media Player opens an mp3 automatically when clicked on a page.
Is this down to my ContentType? I did try "application/octet-stream"
but this kept telling IE that the file was a HTML document, when it isn't so
it would only open it in the browser, or save it.
Many thanks in advance!
Nick.