Tech Off Post

Single Post Permalink

View Thread: Storing text for online article database...
  • wisemx

    How about a bit of code to strip out the markup?
    Something like this:

    Public Function FormatStr(ByVal MessageString As String) As String
            MessageString = Replace(MessageString, Chr(13), "")
            MessageString = Replace(MessageString, Chr(10) & Chr(10), "</p><p>")
            MessageString = Replace(MessageString, Chr(10), "<br />")
            FormatStr = MessageString
        End Function

    FormatStr(Container.DataItem("message"))