Manipulating Strings From datasets using SQL Datasource and asp:DataList
-
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 :-Doooo, the Jedi's will feel this one....
-
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 :-Doooo, the Jedi's will feel this one....
What do you mean with...
replace all the New Line characters with 's
Be more especific!! :confused: Write at least an example or something ;)
-
What do you mean with...
replace all the New Line characters with 's
Be more especific!! :confused: Write at least an example or something ;)
: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....
-
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 :-Doooo, the Jedi's will feel this one....
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....