473,320 Members | 2,147 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,320 software developers and data experts.

Literal and linebreak

Hi, is it possible to have Literal using linebreaks? If i have a textfile
with more than 1 line then Literal take all on one line.

/Per W.
Nov 19 '06 #1
3 1536
Per W. <pe**@tiscali.nowrote:
Hi, is it possible to have Literal using linebreaks? If i have a textfile
with more than 1 line then Literal take all on one line.
Could you try asking your question again in a different way? I'm not
entirely sure I understand. On the other hand, if you mean can you have
a string literal which includes linebreaks, then it definitely depends
on your language (at least in terms of how you do it).

In C#, for instance, you could use:

string verbatimLiteral = @"This text
is on
multiple lines";

or:

string normalLiteral = "This text\r\nhas linebreaks\r\nembedded";

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Nov 19 '06 #2

"Jon Skeet [C# MVP]" <sk***@pobox.comskrev i melding
news:MP************************@msnews.microsoft.c om...
Per W. <pe**@tiscali.nowrote:
>Hi, is it possible to have Literal using linebreaks? If i have a textfile
with more than 1 line then Literal take all on one line.

Could you try asking your question again in a different way? I'm not
entirely sure I understand. On the other hand, if you mean can you have
a string literal which includes linebreaks, then it definitely depends
on your language (at least in terms of how you do it).

In C#, for instance, you could use:

string verbatimLiteral = @"This text
is on
multiple lines";

or:

string normalLiteral = "This text\r\nhas linebreaks\r\nembedded";
Its VB. The only place i got linebreak from a textfile to work is in
textbox, in literal or a cell in a table i dont get the linebreaks. I read a
file with
My.Computer.FileSystem.ReadAllText(memolabel.Text,
System.Text.Encoding.ASCII)

/Per W.
Nov 19 '06 #3
On Sun, 19 Nov 2006 20:59:05 +0100, Per W. wrote:
"Jon Skeet [C# MVP]" <sk***@pobox.comskrev i melding
news:MP************************@msnews.microsoft.c om...
>Per W. <pe**@tiscali.nowrote:
>>Hi, is it possible to have Literal using linebreaks? If i have a textfile
with more than 1 line then Literal take all on one line.

Could you try asking your question again in a different way? I'm not
entirely sure I understand. On the other hand, if you mean can you have
a string literal which includes linebreaks, then it definitely depends
on your language (at least in terms of how you do it).

In C#, for instance, you could use:

string verbatimLiteral = @"This text
is on
multiple lines";

or:

string normalLiteral = "This text\r\nhas linebreaks\r\nembedded";

Its VB. The only place i got linebreak from a textfile to work is in
textbox, in literal or a cell in a table i dont get the linebreaks. I read a
file with
My.Computer.FileSystem.ReadAllText(memolabel.Text,
System.Text.Encoding.ASCII)

/Per W.
Per, this is not a purely ASP.NET newsgroup! Please tell people if you're
asking about WinForms or ASP.NET or most will assume WinForms.

A newline is represented by a <brin a Literal, just as it is in any HTML.

Cheers,
Gadget
Nov 19 '06 #4

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

Similar topics

15
by: nAmYzArC | last post by:
Hi everyone, I'm setting the body of an email using values from a form firstname = bob lastname = dole ebody = 'First Name: ' + firstname + '\r\n' + 'Last Name: ' + lastname ...
4
by: Dirk Reske | last post by:
Hey, I have following struct: struct Packet { string Command; byte data; }
2
by: Georg Weiler | last post by:
Hi, I have a form, where the user enters text. After submit, the text is then inserted into a PostgreSQL database. So far, so good. The problem is, that most of my users copy&paste their text...
3
by: Michael Hamm | last post by:
My page http://www.math.wustl.edu/~msh210/whatsnew.xml (with XSLT and CSS adding formatting) has a paragraph-type break after "Subscribe to this feed" which, afaIct looking at the source code,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.