I have a C# app that I am writing which is going to insert text into a
table, which is then picked up by another program and emailed. On the text
version of the email (when the user doesn't have html email), I need to put
tabs in between columns of data and then line feeds after each row. How can
I do this? Right now I'm doing "\t" for tab and "\r\n" for line feed, but
when I generate the text, those characters actually come out in the text.
Please help.
Mark 5 67911
Mark,
Instead of escape sequences you could also use explicit type casting.
To insert a horizontal tab, you would then simply use (char) 9
Hope this helps.
Regards,
Alex
"Mark" <ma*****@kc.rr.com> wrote in message
news:em**************@TK2MSFTNGP10.phx.gbl... I have a C# app that I am writing which is going to insert text into a table, which is then picked up by another program and emailed. On the
text version of the email (when the user doesn't have html email), I need to
put tabs in between columns of data and then line feeds after each row. How
can I do this? Right now I'm doing "\t" for tab and "\r\n" for line feed, but when I generate the text, those characters actually come out in the text.
Please help. Mark
I tried this and it still comes out with the "\t" in the string.
"Alex Bendig" <a.******@ieee.org> wrote in message
news:be**********@newsserver.rrzn.uni-hannover.de... Mark,
Instead of escape sequences you could also use explicit type casting. To insert a horizontal tab, you would then simply use (char) 9
Hope this helps.
Regards, Alex
"Mark" <ma*****@kc.rr.com> wrote in message news:em**************@TK2MSFTNGP10.phx.gbl... I have a C# app that I am writing which is going to insert text into a table, which is then picked up by another program and emailed. On the text version of the email (when the user doesn't have html email), I need to put tabs in between columns of data and then line feeds after each row. How can I do this? Right now I'm doing "\t" for tab and "\r\n" for line feed,
but when I generate the text, those characters actually come out in the
text. Please help. Mark
Could you show some code for the portion where you generate your text
version of the email? One way could certainly be to substitute the verbatim
escape sequences with the appropriate formatting characters.
"Mark" <ma*****@kc.rr.com> wrote in message
news:uT**************@tk2msftngp13.phx.gbl... I tried this and it still comes out with the "\t" in the string.
"Alex Bendig" <a.******@ieee.org> wrote in message news:be**********@newsserver.rrzn.uni-hannover.de... Mark,
Instead of escape sequences you could also use explicit type casting. To insert a horizontal tab, you would then simply use (char) 9
Hope this helps.
Regards, Alex
"Mark" <ma*****@kc.rr.com> wrote in message news:em**************@TK2MSFTNGP10.phx.gbl... I have a C# app that I am writing which is going to insert text into a table, which is then picked up by another program and emailed. On the text version of the email (when the user doesn't have html email), I need
to put tabs in between columns of data and then line feeds after each row.
How can I do this? Right now I'm doing "\t" for tab and "\r\n" for line feed, but when I generate the text, those characters actually come out in the text. Please help. Mark
Okay, I've tried it both of these ways and get the same result.
string strText="Property Name" + (char)9 + "Address" + (char)9 +
"City/State/Zip";
OR
string strText="Property Name" + "\t" + "Address" + "\t" + "City/State/Zip";
"Alex Bendig" <a.******@ieee.org> wrote in message
news:be**********@newsserver.rrzn.uni-hannover.de... Could you show some code for the portion where you generate your text version of the email? One way could certainly be to substitute the
verbatim escape sequences with the appropriate formatting characters.
"Mark" <ma*****@kc.rr.com> wrote in message news:uT**************@tk2msftngp13.phx.gbl... I tried this and it still comes out with the "\t" in the string.
"Alex Bendig" <a.******@ieee.org> wrote in message news:be**********@newsserver.rrzn.uni-hannover.de... Mark,
Instead of escape sequences you could also use explicit type casting. To insert a horizontal tab, you would then simply use (char) 9
Hope this helps.
Regards, Alex
"Mark" <ma*****@kc.rr.com> wrote in message news:em**************@TK2MSFTNGP10.phx.gbl... > I have a C# app that I am writing which is going to insert text into
a > table, which is then picked up by another program and emailed. On
the text > version of the email (when the user doesn't have html email), I need to put > tabs in between columns of data and then line feeds after each row. How can > I do this? Right now I'm doing "\t" for tab and "\r\n" for line
feed, but > when I generate the text, those characters actually come out in the text. > > Please help. > Mark > >
Mark,
Escape sequences are only interpreted when doing some sort or "Formatted"
operation such as writing to the Console or a file, or in the case of the
StringBuilder, AppendFormat().
To insert formatting characters into a string, try the following:
StringBuilder sb = new StringBuilder();
sb.Append("Text...");
sb.AppendFormat("\t\t");
sb.Append("More Text");
sb.AppendFormat("\r\n");
sb.Append("New Line");
Console.WriteLine( sb.ToString () );
Dan
"Mark" <ma*****@kc.rr.com> wrote in message
news:em**************@TK2MSFTNGP10.phx.gbl... I have a C# app that I am writing which is going to insert text into a table, which is then picked up by another program and emailed. On the
text version of the email (when the user doesn't have html email), I need to
put tabs in between columns of data and then line feeds after each row. How
can I do this? Right now I'm doing "\t" for tab and "\r\n" for line feed, but when I generate the text, those characters actually come out in the text.
Please help. Mark
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Robert |
last post by:
Is there some way to suppress the automatic line feed in the detail section
of a report in Access? I would like the detail to print out to the right of
the existing one. The next line would be...
|
by: Raed Sawalha |
last post by:
Is it possible to make the following div to generate automatic line feed when
user start writing and reaches the DIV bounderies like in textarea, the case
I have when type a continous chars without...
|
by: Lyle A. Sieren |
last post by:
I posted this earlier with another question but did not explain myself well... How do get a line feed character on the end of a line using the streamwriter.writeline fuction? Following are a list...
|
by: Programmer |
last post by:
I have this following code:
x= tempStr.IndexOf((char)13, 0);
The string tempSTR = "
Heading"
|
by: Carsten |
last post by:
Hello,
on my website I'm using the Drupal CMS. But I have a problem. All the
output which is generated doesn't start at the first line (when you
look at the source). All output starts at the...
|
by: Stick |
last post by:
Hi,
I am trying to start my email app (in this case Eudora) with a
programatically generated email. However, Eudora does not seem to recognize
any of the ways I have tried to create line...
|
by: Seller |
last post by:
I am using Wordpress 2.0.6 on Fedora Core 5. An RSS feed is not working for
http://survivalofthesickestthebook.com/blog/?feed=rss2
When I use feed validator...
|
by: charliefortune |
last post by:
I am fetching some product feeds with PHP like this
$merch = substr($key,1);
$feed = file_get_contents($_POST);
$fp = fopen("./feeds/feed".$merch.".txt","w+");
fwrite ($fp,$feed);
fclose...
|
by: Nalaka |
last post by:
Hi,
We are sending SMS messages using our ASDP.net site (C# code)....
How do I add a "Line Feed" character to the string that we are sending?
Any help is deeply appreciated
Thanks
Nalaka
|
by: rengaraj |
last post by:
Dear Experts,
I am new to XML
I want to create an Interview Questions Bank (Intra Net) for our institution.
I preferred to store the Question & Answer in xml sheet.
But if i vew the xml in...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |