Dont think things have changed with ASP.NET to that an extent.
What you are trying to do Vijay would only tell the client browser that the
server is pushing data of type word in the response. hence it asks you
whether you would like to save it.
If you want ASP.net to word and write something to the file then you will
have to look into server side code. Create an object of type
word.application and then write to it. Save it n the harddrive and transfer
the script to the relative location of word doc. or save it and then use
binary reading and write the binary info to response post the headers you
were using.
hope i help clear things out,
HD
[quoted text, click to view] "Vijay Neelam" <vijay_neelam@hotmail.com> wrote in message
news:O94c2krnDHA.1004@TK2MSFTNGP09.phx.gbl...
> 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
>
>