Hello, I've made a simple website for someone to use to be able to enter/update and review data in a database. I have everything working, even a printer friendly page and exporting to PDF without issue. It's the exporting to Word that's causing problems in only one area: when there's a multi-line Label with <br/> inserted for proper HTML formatting. I've scoured the internet and have tried many 'fixes' to no avail. I have a few labels filled with data from a database that was inserted with multi-line text from a textbox. Everything shows up fine, and like I said, it exports to the printer friendly page and to PDF fine with the proper line breaks/formatting. But Word refuses to see them. Any suggestions? Here's my code for my export function (VB.NET): Try Response.Clear() Response.Buffer = True Response.AddHeader("content-disposition", "attachment;filename=" & fileName) Response.ContentEncoding = System.Text.Encoding.UTF8 Response.ContentType = "application/ms-word" Response.Charset = "UTF-8" Response.BinaryWrite(System.Text.Encoding.UTF8.GetPreamble) Dim oStringWriter As New StringWriter() Dim oHtmlTextWriter As New HtmlTextWriter(oStringWriter) 'pnlDetails.RenderControl(oHtmlTextWriter) 'PrepareControlForExport(divDetails) divDetails.RenderControl(oHtmlTextWriter) Response.Output.Write(oStringWriter.ToString) Response.Flush() Catch ex As Exception lblErrors.Visible = True Elmah.ErrorSignal.FromCurrentContext.Raise(ex) Finally Response.End() End Try Code (markup): Thanks for your help.
Sorry all, never mind. It was my own dang fault. I've gotten so used to using LibreOffice on my own machine that I forget sometimes that it's not really Microsoft Office. I just found out that my exporting to Word is working fine as if the file is actually opened in MS Word, everything displays correctly. Strange that LibreOffice doesn't quite show it right, but oh well, it's 'fixed', for now.