Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying string with apostrophe
Message
 
À
17/08/2010 15:03:56
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01476888
Message ID:
01477009
Vues:
58
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform