Extract web page via code fromatting

L

Lit

Hello,

I get a web page, from java web server, via C# code but when I try to write
the response I get from the web page to a text file it has lost of junk in
it.
\r\n\t\n\r\ etc...
what Encoding should I use to get the HTML as seen from View Source???

good day.
 
G

Guest

Hello,

I get a web page, from java web server, via C# code but when I try to write
the response I get from the web page to a text file it has lost of junk in
it.
\r\n\t\n\r\ etc...
what Encoding should I use to get the HTML as seen from View Source???

good day.

\r\n is an escape sequence for a new line
\t for a tab

It means you have these characters in the original text.

Where do you print it? If you view the string in the IDE it may appear
like this. Output to a file would give you a new line and a tab
instead the escape characters

You can also use Replace(Replace("\r\n","") or a regular expression to
remove the escape characters
 
L

Lit

Hello,

I am using the replace and it works good.
I don't print at all
when I save to PDF I am getting the \r\n\t etc..
I was wondering if I can use some Encoding trick that will take care of it
instead of using replace this with that.
Also depending on a .NET class then in the future that will take care of
this automatically instead off having to modify my replace statements.

thanks
 
L

Lit

Nop, The PDF function needs the same thing you see when you view source.
I think some Encoding is needed here.
 

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,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top