#region Format the HTML code as a text format entered in a text box///<summary>///Formats the HTML code as the text format entered in the text box///</summary>///<param name= " Input ' ></param>///<returns></returns> public static string ToHtml (String Input) {StringBuilder SB = new StringBuilder (Input); Sb. Replace ("&", "&"); Sb. Replace ("<", "<"); Sb. Replace (">", ">"); Sb. Replace ("/r/n", "<br/>"); Sb. Replace ("n", "<br/>"); Sb. Replace ("/t", ""); Sb. Replace ("'", "" "); Sb. Replace ("", ""); Return SB. ToString (); ///<summary>///convert spaces, newline character to HTML character///</summary>///<param name= "strcontent" > characters to convert </param >///<returns></returns> public static string strtohtml (String strcontent) {strcontent = Strcontent.repl Ace ("/r/n", "<br/>"); Strcontent = Strcontent.replace ("n", "<br/>"); Strcontent = Strcontent.replace (@ "/S", ""); return strcontent; } #endregion