Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Chr(13) + chr(10)
Message
De
02/05/2013 19:43:50
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01572581
Message ID:
01572582
Vues:
46
This message has been marked as a message which has helped to the initial question of the thread.
NewLine is equivalent to \r\n, so you're getting both of those. You probably only need one of them.

>Hi everybody,
>
>What should we use for chr(13)+chr(10) in .NET? I tried Environment.NewLine but it looks to me like doubled 2 empty lines.
>
>I am using
>
> StringBuilder displayString = new StringBuilder();
>         foreach (DataRow row in dataSet.Tables[0].Rows)
>         {
>            displayString.AppendFormat("Instructor: {0} {1}  [{2}]{3}",
>               row["first_name"].ToString().Trim(), row["last_name"].ToString().Trim(), row["instr_id"].ToString().Trim(), Environment.NewLine);
>
>
>Do you know what I am supposed to use to match
>
>
>lvRetVal='0-Instructor: '+alltrim(first_name)+' '+alltrim(last_name)+'  ['+alltrim(instr_id)+']' + ;
>   chr(13)+chr(10)+chr(13)+chr(10) + ;
>   'Last Checked in: ' + TRANSFORM(NVL(last_ck_in,{})) + CHR(13) + CHR(10) + ;
>
>Thanks in advance.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform