Click here to Skip to main content
16,021,294 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i give a & in my Label box it display like _(underscore). but here i don't want underscore i need only & symbol.
this is sample text to show in my label box :"M/S. XXXXXX Hotels & Tourism".
Posted

SQL
Two ways:

1.Escape it with another ampersand (&&)
    put 2 ampersand symbol continuosly.

2.Set UseMnemonic for that label to false, then all ampersands for that label will be taken literally and you don't need to double them.
 
Share this answer
 
Hi,

you can type whatever symbol you want in label property Text, so you will get conversion in html

ex: if you write in ' in the property window. you will get "e in html..etc..

thanks
Pramod.K
 
Share this answer
 
Hi,

I think you facing this problem in Windows app:

If you use & symbol in front of any text/alphabet , then works like a shortcut for that button. So use && (double &) to display & in any label or button control.

ex:
C#
Label1.Text="Thanks && Regards";
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900