Hi All,
I am using Asp.net with Vb. I have a .net page with lots of controls in it (checkboxes,TextBoxes).I can export it to MS Word.But I cant see the texbox values in the word document after exporting.
Please check the html
You can see the textBox id (txt_FirmName ) .When I use the label instead of texbox it working but In the case of texbox it is not.
Also I want know one more thing .After exporting to word ,is this textbox value display in word document as readonly?
Name of Firm
<%--
--%>
Firm Reference Number
vb.net code
Imports Aspose.Words
Imports Aspose.Cells.Drawing
button_click event as below
Dim license As Aspose.Words.License = New Aspose.Words.License()
license.SetLicense("Aspose.Words.lic")
.
.
.
.
.
Dim builder As New DocumentBuilder(doc)
Dim html As String = String.Empty
Dim sb As New StringBuilder()
Dim tw As New StringWriter(sb)
Dim hw As New HtmlTextWriter(tw)
Page.RenderControl(hw)
html = sb.ToString()
.
.
.
.
builder.InsertHtml(html)
builder.PageSetup.PaperSize = PaperSize.A4
builder.PageSetup.Orientation = Orientation.Landscape
doc = RemoveContentFromMergedCells(doc)
doc = FixRowBackground(doc)
doc = RepeatHeaderRow(doc)
Dim fileName As String = "MyReport"
fileName = fileName + SessionManager.FirmName
fileName = UIHelpers.RemoveInvalidFileNameCharacters(fileName)
doc.Save(fileName + "." + SaveFormat.ToString(), SaveFormat, SaveType.OpenInApplication, Response)