473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

whats the equivalent of vbcrlf,vbcr,vblf (vbscript) in c#.net


i have the following code in asp using vbscript

replace(str,vbcrlf," ")
replace(str,vbcr," ")
replace(str,vblf," ")

where str is any string

i want to convert this code in asp.net using c#.ne
-
sundar_s121
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------

Nov 19 '05 #1
4 25354
vbCr = "\r"
vbLf = "\n"
vbCrLf = "\r\n"

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"sundar_s1210" <su*****************@mail.codecomments.com> wrote in message
news:su*****************@mail.codecomments.com...

i have the following code in asp using vbscript

replace(str,vbcrlf," ")
replace(str,vbcr," ")
replace(str,vblf," ")

where str is any string

i want to convert this code in asp.net using c#.net

--
sundar_s1210
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 19 '05 #2
I think what you are looking for is \n
Not sure if C# has as many variants as VB. I think \n is the only one.

Shawn

"sundar_s1210" <su*****************@mail.codecomments.com> wrote in message
news:su*****************@mail.codecomments.com...

i have the following code in asp using vbscript

replace(str,vbcrlf," ")
replace(str,vbcr," ")
replace(str,vblf," ")

where str is any string

i want to convert this code in asp.net using c#.net

--
sundar_s1210
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 19 '05 #3
See Manohar's reply.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Shawn" <bo********@hotmail.com> wrote in message
news:eH**************@TK2MSFTNGP09.phx.gbl...
I think what you are looking for is \n
Not sure if C# has as many variants as VB. I think \n is the only one.

Shawn

"sundar_s1210" <su*****************@mail.codecomments.com> wrote in message
news:su*****************@mail.codecomments.com...

i have the following code in asp using vbscript

replace(str,vbcrlf," ")
replace(str,vbcr," ")
replace(str,vblf," ")

where str is any string

i want to convert this code in asp.net using c#.net

--
sundar_s1210
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------


Nov 19 '05 #4
Assuming you're actually using the new strings returned, here's the
equivalent from our Instant C# VB.NET to C# converter:

newstring = str.Replace("\r\n", " ");
newstring = str.Replace("\r", " ");
newstring = str.Replace("\n", " ");

The first line could also be:
newstring = str.Replace(System.Environment.NewLine, " ");
(our converter has an option to use this more system-independent version)

David Anton
www.tangiblesoftwaresolutions.com
Home of the Instant C# VB.NET to C# converter
and the Instant VB C# to VB.NET converter

"sundar_s1210" wrote:

i have the following code in asp using vbscript

replace(str,vbcrlf," ")
replace(str,vbcr," ")
replace(str,vblf," ")

where str is any string

i want to convert this code in asp.net using c#.net

--
sundar_s1210
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jason | last post by:
When users fill out my text area field, there is a chance that there will be no line feeds or cariage returns or spaces and just one really long word. THIS CAUSES A MAJOR PROBLEM! What I am trying...
2
by: Benny Pedersen | last post by:
<head><title>Test</title> <style>body{font-Family="courier new";} </style> <script language="javaScript"> function changeTxt() { document.getElementById("b").style.fontFamily="Verdana";...
11
by: BillCo | last post by:
Does anyone know of a way to search through the SQL code of queries to find table name matches? Bear in mind there are literilly 1000's of queries in this database and doing it the old fashioned...
14
by: Ron | last post by:
Hello, I am trying to parse a string on the newline char. I guess vbCrLf is a string constant. How can I parse my string - data - on the newline char? .... data += ASCII.GetString(buffer, 0,...
8
by: Guy | last post by:
Hi, I'm trying to run this code : strFileContentsHTML.Replace(vbLf, "<br>") strFileContentsHTML.Replace(vbCrLf, "<br>") strFileContentsHTML.Replace(vbCr, "<br>") It doesn't replace newline...
4
by: Andyza | last post by:
I'm using FileSystemObject to open and write to a tab delimited text file. First, I connect to a database and select some data. Then I create the text file and insert each record in the text...
3
by: Burning_Ranger | last post by:
If I do something like: txtAddress.Text = "test1" & vbCrLf & "test2 All I get is: test1test2 The represents a character that looks like a rectangle. Why is this?
1
by: Ken Fine | last post by:
I'm using ASP VB. I want to insert a VbCr or a VbLf into a declared string every N characters. FWIW, I want to do this because of an apparent limitation in MSXML2, which I am using to "scrape" data...
4
Breezwell
by: Breezwell | last post by:
Greetings everyone, Just a simple question that I am sure can be taken in many directions: Is there any significant benefit to learning VB.NET as opposed to continuing to use VB? Other than...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.