guys, ive put a repeater control & an asp.net image control in a panel and all exports to word except for the actual image. its just a red 'x' - similiar to when an html page cant find an image.
is there something special i need to do to get this to work?
is the problem using the stringWriter class maybe?
exporting data to word or excel seems to be relatively easy, but images have me stumped.
any help is definately appreciated. thanks
rik
code is Below:
Private Sub exportMeWord()
Try
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/vnd.word"
Response.ContentEncoding = System.Text.Encoding.UTF7
Response.AddHeader("Content-Disposition", "attachment;filename=History.doc")
Response.Charset = ""
EnableViewState = False
Dim oStringWriter As System.IO.StringWriter = New System.IO.StringWriter
Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(oStringWriter)
Panel2.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter.ToString())
Response.End()
Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub