How do i preserver enter while using HttpUtility.HtmlEncode function.
Sorry Wrong post.
Actually the problem was the TextBox which stores the value after encoding was not multiline.
That was the problem. In case you still have problems ever aftet multiline is set to true just
send me a mail i did write a code using split() but forgot to save it so just mail me.