Server side HTML printing

S

sprash25

Hi,

I am using a rich text editor (FCKEdit) on a webpage in which user can
enter formatted text.
The output of this control is HTML. Now on the code behind side, I need
to change some of this HTML and then print the HTML (the pretty
document - not the code) on the server printer.

Any ideas??

Thanks in advance
 
V

vMike

Hi,

I am using a rich text editor (FCKEdit) on a webpage in which user can
enter formatted text.
The output of this control is HTML. Now on the code behind side, I need
to change some of this HTML and then print the HTML (the pretty
document - not the code) on the server printer.

Any ideas??

Thanks in advance
Well, I can help you with the capture of the html side. The printing is
another matter. This code will capture the html just before it get sent to
the client. You also google for 'asp.net output html save'

Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)

Dim _stringBuilder As StringBuilder = New StringBuilder()
Dim _stringWriter As StringWriter = New StringWriter(_stringBuilder)
Dim _htmlWriter As HtmlTextWriter = New HtmlTextWriter(_stringWriter)
MyBase.Render(_htmlWriter)

Dim html As String = _stringBuilder.ToString()

'here is where you can manipulate or save to file or database or maybe print
the html output string

writer.Write(html) 'this writes the page back out

End Sub

Mike
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top