#5 Using Emojis / Emoticons 👍
Working with 😃 Emojis / Emoticons
Emojis or Emoticons are built into all mobile devices and modern desktops. The way they work is that they are actually a very long character code - which automatically works in UTF-8 documents. That is the default in asp.net, so you're good to go.
Just showing Emojis in Source-Code
Check out 🙈 🙉 🙊 ☔ 🎄 - I just pasted these into the source code from
emojipedia
Showing Emojis instead of true/false
Below you'll see a helper I created called Boolmoji - it will show a ✔️ or ❌ instead of boolean values.
- Boolmoji(true) ⇒ ✔️
- Boolmoji(false) ⇒ ❌
@functions {
string Boolmoji(bool value) { return value ? "✔️" : "❌"; }
}
<ul>
<li>Boolmoji(true) ⇒ @Boolmoji(true)</li>
<li>Boolmoji(false) ⇒ @Boolmoji(false)</li>
</ul>
#5 Using Emojis / Emoticons 👍
@inherits Custom.Hybrid.Razor14
<!-- unimportant stuff, hidden -->
Working with 😃 Emojis / Emoticons... <!-- unimportant stuff, hidden -->
@functions {
string Boolmoji(bool value) { return value ? "✔️" : "❌"; }
}
<ul>
<li>Boolmoji(true) ⇒ @Boolmoji(true)</li>
<li>Boolmoji(false) ⇒ @Boolmoji(false)</li>
</ul>
<!-- unimportant stuff, hidden -->