Apply marking style to label using C #

I show a message on the asp label when the user is successfully saved. I want to add a bullet to the top of the message. So, I tried the following code, but it did not help me.

lblSuccessMsg.Text = BulletStyle.Disc + "'" + obj.record + "saved successfully.";

message output:

Record saved successfully.

How can I do the same with C #.

+5
source share
3 answers

In C #, you can simply add a bullet to your string with your Unicode number.

lblSuccessMsg.Text = "\u2022 '" + obj.record + "' saved successfully.";
+17
source

In addition to Marcel Gheorghita, answer a few more unicode bullet characters:

‣ \u2023 (TRIANGULAR BULLET)
◦ \u25E6 (WHITE BULLET)
◉ \u25C9 (FISHEYE)
■ \u25A0 (BLACK SQUARE)
□ \u25A1 (WHITE SQUARE)
❏ \u274F (LOWER RIGHT DROP-SHADOWED WHITE SQUARE)
+16
source

:

lblSuccessMsg.Text = "<span style='background: url(Images/DotImage.png) no-repeat 1px 1px'>"+obj.record+" saved successfully</span>";

, , -, , , ,

-1

All Articles