Extract web page via code fromatting

  • Thread starter Thread starter Lit
  • Start date Start date
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.
 
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
 
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
 
Nop, The PDF function needs the same thing you see when you view source.
I think some Encoding is needed here.
 
Back
Top