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
VulpesPosted Jun 2, 2014, 7:23 AM
VulpesPosted Jun 2, 2014, 9:44 AM
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.
Gowri APosted Jun 2, 2014, 9:09 AM
Gowri APosted Jun 2, 2014, 6:59 AM
context.Response.Write(HttpContext.Current.Server.HtmlEncode(rec.RegistrationNumber + "|" + rec.ApplicantName + " " + rec.GuarantorName + Environment.NewLine));
Gowri APosted Jun 2, 2014, 6:52 AM
Gowri APosted Jun 2, 2014, 6:51 AM
Praveen NPosted Jun 2, 2014, 5:46 AM
Response.Write(Server.HtmlEncode(Environment.CurrentDirectory + "|" + Environment.CurrentManagedThreadId + "|" + Environment.NewLine));
Regards,
Praveen Nelge
Lakshmanan Sethu SankaranarayanPosted Jun 2, 2014, 1:56 AM
Please try adding escape character '\' and try this.
Khan Abrar AhmedPosted Jun 2, 2014, 1:53 AM
Response.Write(Server.HtmlEncode(rec.RegistrationNumber+"|"+ rec.ApplicantName+"|"+ rec.GuarantorName+ Environment.NewLine));