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
----------------------------------------------------------------------- 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 ------------------------------------------------------------------------
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 ------------------------------------------------------------------------
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 ------------------------------------------------------------------------
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 ------------------------------------------------------------------------
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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";...
|
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...
|
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,...
|
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...
|
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...
|
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?
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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: 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,...
|
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...
|
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...
| | |