Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying string with apostrophe
Message
From
18/08/2010 08:49:12
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01476888
Message ID:
01477021
Views:
36
>>Hi,
>>
>>This should be an easy one for someone.
>>
>>I have code like this:
>>
>>
message = "This plan is not applicable for the Insured's Age and/or Sum Assured";
>>
>>but when this string is displayed, it cuts off at the apostrophe. I've tried it like this:
>>
>>
message = @"This plan is not applicable for the Insured's Age and/or Sum Assured";
>>
>>but the same thing. How do I get this to display the full string?
>
>It's probably getting clipped in the HTML when it's rendered. For example, if you display an image and set the ALT tag using single quote delimiters:
>
>
><img src="/myimg.jpg" alt='This plan is not applicable for the Insured's Age and/or Sum assumed' /
>
>
>Notice that the single quote in Insured's terminates the starting quote, which would explain why it's clipping it. Change the single quote to the encoded version of '
>
>
message = @"This plan is not applicable for the Insured's Age and/or Sum Assured";
>
>and see if that works instead.

Thanks Paul,

that explains the logic behind the problem and using ' worked.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform