Why save dialog displaying twise

  • Thread starter Thread starter Vijay Neelam
  • Start date Start date
V

Vijay Neelam

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
 

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