Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Manipulating Strings From datasets using SQL Datasource and asp:DataList

Manipulating Strings From datasets using SQL Datasource and asp:DataList

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasequestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Unsworth
    wrote on last edited by
    #1

    Hi Guys I'm afraid I'm fairly new to ASP.NET, so I'm struggling a bit with this. I have a datalist which is getting driven by a datasource. All this works well, but I have a text field which I want to manipulate at runtime. I currently have '<%# Eval("Body") %>' which is to display the field, but I want to replace all the New Line characters with
    's so that it displays properly. Can this be done? Thank you in advance :-D

    oooo, the Jedi's will feel this one....

    P P 2 Replies Last reply
    0
    • P Paul Unsworth

      Hi Guys I'm afraid I'm fairly new to ASP.NET, so I'm struggling a bit with this. I have a datalist which is getting driven by a datasource. All this works well, but I have a text field which I want to manipulate at runtime. I currently have '<%# Eval("Body") %>' which is to display the field, but I want to replace all the New Line characters with
      's so that it displays properly. Can this be done? Thank you in advance :-D

      oooo, the Jedi's will feel this one....

      P Offline
      P Offline
      PunkIsNotDead
      wrote on last edited by
      #2

      What do you mean with...

      replace all the New Line characters with 's

      Be more especific!! :confused: Write at least an example or something ;)

      P 1 Reply Last reply
      0
      • P PunkIsNotDead

        What do you mean with...

        replace all the New Line characters with 's

        Be more especific!! :confused: Write at least an example or something ;)

        P Offline
        P Offline
        Paul Unsworth
        wrote on last edited by
        #3

        :doh: Sorry... I should have previewed that... I meant "replace all the new line characters with the HTML line break < b r / >'s" thanks... :-O

        oooo, the Jedi's will feel this one....

        1 Reply Last reply
        0
        • P Paul Unsworth

          Hi Guys I'm afraid I'm fairly new to ASP.NET, so I'm struggling a bit with this. I have a datalist which is getting driven by a datasource. All this works well, but I have a text field which I want to manipulate at runtime. I currently have '<%# Eval("Body") %>' which is to display the field, but I want to replace all the New Line characters with
          's so that it displays properly. Can this be done? Thank you in advance :-D

          oooo, the Jedi's will feel this one....

          P Offline
          P Offline
          Paul Unsworth
          wrote on last edited by
          #4

          I sorted it by performing the action in my SQL Stored Proc rather than trying to do it in the page... Thanks anyway dudes... :-D

          oooo, the Jedi's will feel this one....

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups