"&" string cant display in Lable control
-
I have a value comes from data base like, Mr & Mrs. Taniya and displaying it in a Lable Control Lable1.Text = value; // string value comes from database. But result display without "&" mark i need to display it.. I Cant use two "&&" for that any solution??
-
I have a value comes from data base like, Mr & Mrs. Taniya and displaying it in a Lable Control Lable1.Text = value; // string value comes from database. But result display without "&" mark i need to display it.. I Cant use two "&&" for that any solution??
-
Try: & amp; (but without the space, i added the space since CP changes it to the and sign)
Regards, Gareth. (FKA gareth111)
-
I have a value comes from data base like, Mr & Mrs. Taniya and displaying it in a Lable Control Lable1.Text = value; // string value comes from database. But result display without "&" mark i need to display it.. I Cant use two "&&" for that any solution??
ASysSolvers wrote:
I Cant use two "&&" for that any solution?
Why not? That's the way you display an & in a label. A single & is used to specify a shortcut key, and && is used to display & in the label.
Despite everything, the person most likely to be fooling you next is yourself.
-
ASysSolvers wrote:
I Cant use two "&&" for that any solution?
Why not? That's the way you display an & in a label. A single & is used to specify a shortcut key, and && is used to display & in the label.
Despite everything, the person most likely to be fooling you next is yourself.
-
I have a value comes from data base like, Mr & Mrs. Taniya and displaying it in a Lable Control Lable1.Text = value; // string value comes from database. But result display without "&" mark i need to display it.. I Cant use two "&&" for that any solution??
Try setting the UseMnemonic property of the Label to true. I believe your developing a desktop application. Right?
Nirandas, a developer from India. http://www.nirandas.com
-
Try setting the UseMnemonic property of the Label to true. I believe your developing a desktop application. Right?
Nirandas, a developer from India. http://www.nirandas.com
-
Nirandas wrote:
Try setting the UseMnemonic property of the Label to true.
You're going to want to set the UseMnemonic property to false, not true to get the ampersand to display in the label's Text property.
It is working fine, Thank U very much for all.