Hello,
foreach(SearchLoanEntities rec in registrationNumber)
{
context.Response.Write(rec.RegistrationNumber+"|"+
rec.ApplicantName+"|"+
rec.GuarantorName+
Environment.NewLine);
}
From the above code i'm expecting the output as
AP011234|Gowri|Gowri
but it is displaying
AP011234
It is treating | this as or instead of treating this as or how do i get this operator in output
Loading

VulpesRank #55 · 29.2K reputationPosted Jun 2, 2014, 3:23 AM EDT
Khan Abrar AhmedRank #778 · 3K reputationPosted Jun 1, 2014, 9:53 PM EDT
Response.Write(Server.HtmlEncode(rec.RegistrationNumber+"|"+ rec.ApplicantName+"|"+ rec.GuarantorName+ Environment.NewLine));
Lakshmanan Sethu SankaranarayanRank #124 · 17.7K reputationPosted Jun 1, 2014, 9:56 PM EDT
Please try adding escape character '\' and try this.
Praveen N104 reputationPosted Jun 2, 2014, 1:46 AM EDT
Response.Write(Server.HtmlEncode(Environment.CurrentDirectory + "|" + Environment.CurrentManagedThreadId + "|" + Environment.NewLine));
Regards,
Praveen Nelge
Gowri A53 reputationPosted Jun 2, 2014, 2:51 AM EDT
Gowri A53 reputationPosted Jun 2, 2014, 2:52 AM EDT
Gowri A53 reputationPosted Jun 2, 2014, 2:59 AM EDT
context.Response.Write(HttpContext.Current.Server.HtmlEncode(rec.RegistrationNumber + "|" + rec.ApplicantName + " " + rec.GuarantorName + Environment.NewLine));
Gowri A53 reputationPosted Jun 2, 2014, 5:09 AM EDT
VulpesRank #55 · 29.2K reputationPosted Jun 2, 2014, 5:44 AM EDT
http://www.degraeve.com/reference/specialcharacters.php
Some of them have names such as " for a double-quote character and & for an ampersand.
If they don't have names (or even if they do) you can use a combination like this &#nnnn;
where nnnn represents the unicode (or ASCII if less than 128) character code.
So, for the vertical bar, we can use | because 124 is its ASCII value.