Click here to Skip to main content
15,903,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have developed a user control. the comment is entered from memo edit control and displayed on web browser control. the comment or text entered is formatted using xslt. the input to xslt is xml string.
the code for converting collection object to string is:

Public Function TOXML(ByVal o As Comments) As String
            Dim x As New XmlDocument
            Dim xs As New Xml.Serialization.XmlSerializer(o.GetType)
            Dim ms As New IO.MemoryStream
            xs.Serialize(ms, o)
            ms.Position = 0
            Return x.InnerXml
           End Function
End Class

now here if i write
how r u

my string displays it considering the new line character but the xml file is not reading the new line character. it displays the comment in one line

hihow r u

and so does the xslt. i want to display the text in web browser control as it is as the user enters considering the new line character.

what changes should be made n where?

how can i make xml file to read the new line character?
Updated 31-Mar-11 22:42pm

1 solution

I think <br /> tag will work fine for you. Try it.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900