Replace a line break

Results 1 to 2 of 2

Thread: Replace a line break

  1. #1
    Join Date
    Dec 1969

    Default Replace a line break

    I want to use read what is entered from a textarea field and parse it into a session variable.<BR><BR>To do this I have the follwing code:<BR>&#060;% Session("ProjectDesc") = Request.Form("ProjectDesc") %&#062;<BR>Where The Textarea&#039s name is ProjectDesc.<BR><BR>Now I want to find line breaks within that textarea and convert them to the &lt;br&gt; key.<BR><BR>How do I do this?<BR><BR>I have this much, but I am unsure what to place within the middle set of quotes. (Do I use even use quotes for this part?).<BR>Please let me know at first chance.<BR><BR>&#060;% Session("ProjectDesc") = replace(Request.Form("ProjectDesc")," ","&lt;br&gt;") %&#062;<BR><BR>Thank You<BR>Jared

  2. #2
    Join Date
    Dec 1969

    Default RE: Replace a line break

    Try this:<BR><BR>&#060;% Session("ProjectDesc") = replace(Request.Form("ProjectDesc"), chr(13),"<BR>") %&#062;<BR><BR>Hope that helps<BR><BR>Pete

Posting Permissions

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