Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > replacing CR with <BR>

Reply
Thread Tools

replacing CR with <BR>

 
 
Saber
Guest
Posts: n/a
 
      07-30-2004
I'm using a multiline textbox as a simple editro.
I want to change all CRs in textbox with <BR>,
Is there a way better than using For loops and replace CR with <BR> one by
one?


 
Reply With Quote
 
 
 
 
Jos
Guest
Posts: n/a
 
      07-30-2004
Saber wrote:
> I'm using a multiline textbox as a simple editro.
> I want to change all CRs in textbox with <BR>,
> Is there a way better than using For loops and replace CR with <BR>
> one by one?


You didn't say which language you use.

This is for VB:
Dim Text2 As String = TextBox1.Text.Replace(vbCRLF,"<BR>")

--

Jos


 
Reply With Quote
 
 
 
 
Raterus
Guest
Posts: n/a
 
      07-30-2004
something wrong with using the Replace function?

newstring = txtMultiline.text.replace(vbCrLf, "<br>")

"Saber" <saber[--AT--]maghalat.com> wrote in message news:(E-Mail Removed)...
> I'm using a multiline textbox as a simple editro.
> I want to change all CRs in textbox with <BR>,
> Is there a way better than using For loops and replace CR with <BR> one by
> one?
>
>

 
Reply With Quote
 
ashelley@inlandkwpp.com
Guest
Posts: n/a
 
      07-30-2004
On Fri, 30 Jul 2004 20:35:17 +0430, "Saber"
<saber[--AT--]maghalat.com> wrote:

>I'm using a multiline textbox as a simple editro.
>I want to change all CRs in textbox with <BR>,
>Is there a way better than using For loops and replace CR with <BR> one by
>one?
>


the string class has replace functions.

-Adam

 
Reply With Quote
 
Saber
Guest
Posts: n/a
 
      07-30-2004
Thanks All,
I didn't knew there is such a good function.
thanks again

"Jos" <(E-Mail Removed)> wrote in message
news:uwL%239$(E-Mail Removed)...
> Saber wrote:
>> I'm using a multiline textbox as a simple editro.
>> I want to change all CRs in textbox with <BR>,
>> Is there a way better than using For loops and replace CR with <BR>
>> one by one?

>
> You didn't say which language you use.
>
> This is for VB:
> Dim Text2 As String = TextBox1.Text.Replace(vbCRLF,"<BR>")
>
> --
>
> Jos
>
>



 
Reply With Quote
 
eli rodriguez
Guest
Posts: n/a
 
      08-02-2004
Saber wrote:

> I'm using a multiline textbox as a simple editro.
> I want to change all CRs in textbox with <BR>,
> Is there a way better than using For loops and replace CR with <BR> one by
> one?
>
>

use the replace(textvar,IDCRs,"<br>")

where IDCRs is the chr()
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing String Using Regular Expression lucky ASP .Net 11 11-11-2005 07:01 AM
Guide: Replacing your North Bridge Heatsink RObErT_RaTh Reviews & How-To's 34 09-08-2005 07:22 AM
Replacing - and not Replacing... Rob Meade ASP General 5 04-11-2005 06:49 PM
Replacing groups of statements Salman VHDL 1 04-05-2005 03:42 PM
Replacing UTP with wireless, what equipment? Joel Dorfan Wireless Networking 2 10-31-2004 12:44 PM



Advertisments