I'm trying to get linefeeds to display correctly in a datagrid (text is
taken from a database of text that has been htmlencoded)
By default it doesn't display them. But <br/> tags display fine.
however, when I do
validated.Replace(vbCrLf, "<br/>")
or
validated.Replace(chr(10), "<br/>")
or
validated.Replace(chr(13), "<")
or even a function with this
While (posistion < validated.Length And posistion > -1)
posistion = validated.IndexOf(vbcrlf, posistion) (tried the other
combinations)
If posistion = -1 Then
Exit While
End If
validated.Remove(posistion, 1)
validated.Insert(posistion, "<br/>")
posistion = posistion + 5
End While
None of that seems to remove and replace at all.. can anyone suggest what I
can do? 2 1485
Can you wrap the html text in <pre></pre> tags....
HTH
MarTin..
"Grant Mills" <mi**********@noDamSpamTelusplanet.net> wrote in message
news:MVVoc.5037$j6.3655@edtnps84... I'm trying to get linefeeds to display correctly in a datagrid (text is taken from a database of text that has been htmlencoded)
By default it doesn't display them. But <br/> tags display fine.
however, when I do
validated.Replace(vbCrLf, "<br/>")
or
validated.Replace(chr(10), "<br/>")
or
validated.Replace(chr(13), "<")
or even a function with this
While (posistion < validated.Length And posistion > -1)
posistion = validated.IndexOf(vbcrlf, posistion) (tried the other combinations)
If posistion = -1 Then
Exit While
End If
validated.Remove(posistion, 1)
validated.Insert(posistion, "<br/>")
posistion = posistion + 5
End While
None of that seems to remove and replace at all.. can anyone suggest what
I can do?
validated.Replace(vbCrLf, "<br/>")
I use the above technique and it works fine.
So I can only conclude you do NOT have any vbCRLFs in your data!
I recommend you parse it to identify what the real character is.
--
Joe Fallon
"Grant Mills" <mi**********@noDamSpamTelusplanet.net> wrote in message
news:MVVoc.5037$j6.3655@edtnps84... I'm trying to get linefeeds to display correctly in a datagrid (text is taken from a database of text that has been htmlencoded)
By default it doesn't display them. But <br/> tags display fine.
however, when I do
validated.Replace(vbCrLf, "<br/>")
or
validated.Replace(chr(10), "<br/>")
or
validated.Replace(chr(13), "<")
or even a function with this
While (posistion < validated.Length And posistion > -1)
posistion = validated.IndexOf(vbcrlf, posistion) (tried the other combinations)
If posistion = -1 Then
Exit While
End If
validated.Remove(posistion, 1)
validated.Insert(posistion, "<br/>")
posistion = posistion + 5
End While
None of that seems to remove and replace at all.. can anyone suggest what
I can do? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Danny |
last post by:
I need an asp command to strip out from a string all extra punctuation such
as apostrophe, comma, period, spaces dashes, etc etc and just leave the
letters.
Can anybody give me some ideas?
...
|
by: SeaPlusPlus |
last post by:
I want to convert large files of prose to xhtml and so I need a way to
remove unwanted line wraps. So, I'm looking for a freebee editor that
has the capability of searching for a single "carriage...
|
by: lino |
last post by:
Hello,
I have the following string:
const char plaintext = "Fourscore and seven years ago our \
fathers brought forth upon this continent \
a new nation, conceived in liberty, and dedicated...
|
by: Grant Mills |
last post by:
I'm trying to get linefeeds to display correctly in a datagrid (text is
taken from a database of text that has been htmlencoded)
By default it doesn't display them. But <br/> tags display fine.
...
|
by: tshad |
last post by:
How do I go about this?
I used to know this, but can't find VB.net replace that does this.
Something like
string.replace("<br>",NL)
Thanks,
|
by: Øyvind Isaksen |
last post by:
Hi!
I use this function to show the text with linefeeds on my webpages:
-----------------------------------
replace(myText,Chr(13),"<br>")
----------------------------------
This works...
|
by: Kevin Hodgson |
last post by:
I'm having a problem with System.Web.Mail.MailMessage losing linefeeds when
creating an email.
This is a VB.NET project. I use a stringbuilder to construct the
MailMessage.Body and use vbCrLf...
|
by: JackpipE |
last post by:
Here is my replace query and I need to run this on every column in my
table. Right now I manually enter the column name (_LANGUAGES_SPOKEN)
but this is time consuming and would like to automate...
|
by: dino d. |
last post by:
I need to parse a string by linefeeds and paragraphs. I need to
preserve all periods and linefeeds too, so I can't simply use strtok
or explode (both of which don't tell you where or which (period...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |