I'm working on a project where a Word document is generated dynamically, then is streamed to the user via the Response.WriteFile command, but I'm running into some problems. The exact same code works for my .pdf file, but for some reason I encounter weird errors with .doc files. Here's the code:
Protected Sub btnDoc_Click(ByVal s As Object, ByVal e As ImageClickEventArgs) Handles btnDoc.Click
btnSave_Click(s, e)
Try
_oConn.Open()
Dim Contract As New Contract(_oConn, _ContID)
Dim Artist As New Artist(_oConn, Contract.ArtID)
Dim Promotion As New Promotion(_oConn, Contract.PromID)
Dim Venue As New Venue(_oConn, Contract.VenID)
Dim Doc As New Doc
Try
Doc.Open(Server.MapPa ...
Go to the complete details ...