CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    1

    Can someone help me translate this?

    <%# databinder.eval(container.dataitem, "c_account_info").ToString.Replace(ControlChars.CrLf, "<br/>") %>

    This basically takes any carriage returns in the database field and replaces them with html <br> characters. It's easy to do in VB, but can anyone help me convert this into c#? I've poured over the MSDN documentation and my O'Reilly reference, and I simply can't find any C# equivalent to "ControlChars.CrLf."

    Any help would be great!

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    use
    \n for linefeed and
    \r for carriage return

    Paresh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured