Why save dialog displaying twise

From: Vijay Neelam (vijay_neelam_at_hotmail.com)
Date: 10/30/03


Date: Thu, 30 Oct 2003 13:08:15 +0530

Hi all,
Dim a As String = Response.ContentType
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/msword"
Response.AddHeader("content-disposition", "attachment;
filename=Document.doc")
Response.Write(strDoc)
Response.ContentType = a
Response.End()

I'm writing this code in ASP.NET I'm getting download dialog box but I'm
getting twise if I clicked on open.

My purpose is I want to download a worddocument from server and also need to
write some string in that document.

Open is only opening MSWord window but not opening document.

Does any one know solution to this problem.. please post

Thank you,
Vijay Neelam



Relevant Pages

  • Re: multi-threaded app/ using lock
    ... I am using multiple child threads per main thread to download files. ... public delegate string ThreadFinishedCallback; ... sFileName = GetNextFileName; ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Internet Table Transfer
    ... URLDownloadToFile is an api function. ... ActiveX component. ... callbacks on the progress of the download. ... Pointer to a string value containing the URL to be downloaded. ...
    (microsoft.public.excel.programming)
  • Re: Internet download APIs only get first part of file, rest is blank
    ... filling up the rest of the string. ... Code for the download function follows ... ... Private Declare Function InternetCloseHandle Lib "wininet" (ByVal hInet As ...
    (microsoft.public.vb.general.discussion)
  • Question for Randy Birch About Download File
    ... I am using the following code from Randy's site to download some extra files ... DownloadTempRegKey As String 'temporary download destination folder ... Private Declare Function RegQueryValueEx Lib "advapi32.dll" _ ... Dim dldata As FileRegistryDownloadData ...
    (microsoft.public.vb.general.discussion)
  • Re: How to download a file from the internet using inet control
    ... 'Download an URL to a local file without caching. ... Public Function DownloadURL2FileNoCache(ByRef sSourceUrl As String, ... Dim BufferAs Byte ... Dim lNumberOfBytesRead As Long ...
    (microsoft.public.vb.general.discussion)