Click here to Skip to main content
14,766,261 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi.
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
            x.Load(ms)
            Return x.InnerXml
           End Function
End Class


now here if i write
hi
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?
Posted
Updated 31-Mar-11 23:42pm
v2

1 solution

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

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