Put a Break Point and check whether it contains, vbCrLf or ..............
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
I have a multiline textbox "Notes". It contains the text:
"This is a line
And another line is here
And another one here"
I want to replace the CrLf with another character, but somehow asp.net doesnt see the Crlf
Now, I see two CrLf in the above text. But when I call Notes.IndexOf(vbCrLf) I get -1
Hi,
Does the text in this TextBox come from database or it is inputted by users? Actually, it is inputted by users, I think the situation cannot be happened for there must be an newline char (vbCrLf ) in the text when it contains more than one line.
So, if the text comes from database, then, could you paste some code to show how you insert the data and how you fetch them from database? This will be helpful for us to troubleshoot the issue. Thanks for your understanding.
Peter Smith
Contributor
4605 Points
2109 Posts
replace CrLf in textbox
May 04, 2009 09:49 PM|LINK
I have a multiline textbox "Notes".
It contains the text:
"This is a line
And another line is here
And another one here"
I want to replace the CrLf with another character, but somehow asp.net doesnt see the Crlf
Now, I see two CrLf in the above text. But when I call Notes.IndexOf(vbCrLf) I get -1
nikki_doer_o...
Contributor
6863 Points
1097 Posts
Re: replace CrLf in textbox
May 04, 2009 09:55 PM|LINK
Try the text property -- Notes.Text.IndexOf
"If we learn from our mistakes, I should be brilliant by now."
MCTS - .NET Framework 2.0: Web Applications
Peter Smith
Contributor
4605 Points
2109 Posts
Re: replace CrLf in textbox
May 04, 2009 09:58 PM|LINK
My bad, I already tried that as well :)
imran_ku07
All-Star
45864 Points
7713 Posts
MVP
Re: replace CrLf in textbox
May 05, 2009 03:39 AM|LINK
Put a Break Point and check whether it contains, vbCrLf or ..............
Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD
tamilcodes
Contributor
3140 Points
690 Posts
Re: replace CrLf in textbox
May 05, 2009 03:49 AM|LINK
Check for the new line character "\n"
TUTORIAL RIVER - HTML, ASP.NET, PHOTOSHOP, WEB DESIGN TUTORIALS
mo meng
Contributor
6700 Points
1351 Posts
Re: replace CrLf in textbox
May 05, 2009 04:34 AM|LINK
try
replace(str,vbcrlf," ")
replace(str,vbcr," ")
replace(str,vblf," ")
Shengqing Ya...
All-Star
45968 Points
2997 Posts
Re: replace CrLf in textbox
May 08, 2009 07:35 AM|LINK
Hi,
Does the text in this TextBox come from database or it is inputted by users? Actually, it is inputted by users, I think the situation cannot be happened for there must be an newline char (vbCrLf ) in the text when it contains more than one line.
So, if the text comes from database, then, could you paste some code to show how you insert the data and how you fetch them from database? This will be helpful for us to troubleshoot the issue. Thanks for your understanding.
Best Regards,
Shengqing Yang
If you have any feedback about my replies, please contact msdnmg@microsoft.com.
Microsoft One Code Framework