Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 carriage return and line feed

Author  Topic 

olay80
Yak Posting Veteran

62 Posts

Posted - 2005-04-07 : 10:51:28
hey guys,

while executing i need to write some values on a txt file created, the problem is that i'm not beeing able to return to a new line. can anyone help.

thanx,
Oliver

rfrancisco
Yak Posting Veteran

95 Posts

Posted - 2005-04-07 : 10:54:01
Please insert the code you are using for us to have a better idea where the problem is.
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2005-04-07 : 11:17:31
well, in VB.net is just vbcrlf.
object.writeline("My String" & vbcrlf)
object.writeline("My String2" & vbcrlf)

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-04-07 : 11:48:28
If the object supports WriteLine(), you shouldn't need to add a vbcrlf (unless you want double-spacing).

Also, remember that you are outputting HTML to a web browser, so CR+LF means nothing in terms of formatting. You'd need to use <B> or <P> tags, or any block-style HTML element.

- Jeff
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-04-07 : 11:51:07
<B> is the bold tag, you'd want <BR> if this is html.



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-04-07 : 11:51:49
Doh!


- Jeff
Go to Top of Page

graz
Chief SQLTeam Crack Dealer

4149 Posts

Posted - 2005-04-07 : 23:32:43
You can also use
System.Environment.NewLine
to return the appropriate characters.

===============================================
Creating tomorrow's legacy systems today.
One crisis at a time.
Go to Top of Page

olay80
Yak Posting Veteran

62 Posts

Posted - 2005-04-08 : 03:23:22
thanx guys,

it would work if u just insert "\r\n" wherever u wanna go to a new line...(using C#) as for the VB well i guess Micheal provided u with the solution...

Oliver
Go to Top of Page
   

- Advertisement -