Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying string with apostrophe
Message
 
To
17/08/2010 15:03:56
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01476888
Message ID:
01477009
Views:
57
This message has been marked as a message which has helped to the initial question of the thread.
>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.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform