Search:
Namespaces
Discussions
.NET v1.1
Feedback
HELP: Replacing line breaks in a web form textbox
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngvb' list
.
Jason Hick
-- Moved from [aspngfreeforall] to [aspngvb] by Tim Musschoot <
Click here to reveal e-mail address
> --
Hi!
I've got a textbox on a web form that I need to "clean up" before it gets
inserted into a database.
The code snippet below shows what I'm trying to do.....
Dim strAddress As String
strAddress = frmAddress.Value.Replace(chr(13), ",")
...but I get the error message: Name 'Chr' is not declared. (I know this is
probably because of the brackets)
Please can someone tell me how can I replace the line breaks/carriage
returns???
Thanks!
Jason
------------------------------------------------------
Jason Hick
www.needapresent.com
Reply to this message...
Bob Macleod
There are built-in constants vbCr and vbCrLf for this type of comparison.
There are other items of interest for processing delimited values too, such
as the Split function.
[Original message clipped]
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
Reply to this message...
hassan.hussein@zurich.com
Hi
What classes are you importing to use the chr function? Do have
System.Text.
Encoding
imported?
Hassan
"Jason Hick"
<jason.hick@circa To: "aspngvb" <
Click here to reveal e-mail address
>
mundi.com> cc:
Subject: [aspngvb] HELP: Replacing line breaks in a web form textbox
03/07/2002 08:44
AM
Please respond to
"aspngvb"
-- Moved from [aspngfreeforall] to [aspngvb] by Tim Musschoot
<
Click here to reveal e-mail address
> --
Hi!
I've got a textbox on a web form that I need to "clean up" before it gets
inserted into a database.
The code snippet below shows what I'm trying to do.....
Dim strAddress As String
strAddress = frmAddress.Value.Replace(chr(13), ",")
...but I get the error message: Name 'Chr' is not declared. (I know this is
probably because of the brackets)
Please can someone tell me how can I replace the line breaks/carriage
returns???
Thanks!
Jason
------------------------------------------------------
Jason Hick
www.needapresent.com
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
Reply to this message...
Remas Wojciechowski
Jason,
you have (at least) two options:
1. (preferred) use System.
Environment
.NewLine instead of Chr(13) [Chr(10)
might be required, too]
2. add Import Microsoft.VisualBasic to your code. It contains declarations
for pre-.NET VB functions etc.
hth
Remas
http://www.aspalliance.com/remas
----- Original Message -----
From: "Jason Hick" <
Click here to reveal e-mail address
>
To: "aspngvb" <
Click here to reveal e-mail address
>
Sent: Wednesday, July 03, 2002 9:44 AM
Subject: [aspngvb] HELP: Replacing line breaks in a web form textbox
> -- Moved from [aspngfreeforall] to [aspngvb] by Tim Musschoot
<
Click here to reveal e-mail address
> --
[Original message clipped]
Reply to this message...
System.Environment
System.Text.Encoding
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com