简体   繁体   English

在c#的编码端使用粗体字体

[英]use bold font at coding side in c#

hii friend i have one problem please try to solve this hii朋友我有一个问题请尝试解决这个问题

msg.Body = "Hi , " + txtrfname.Text.Trim() + "!\n" + " Your RCNO is " + rcno + "!\n Thank you for showning intrasted and registration Please <a href='" + activationurl + "'>click hear to activate </a> your account and enjoy our services \n Thank you.";

i have this code in c# scripting language and now i want to bold "rcno" in this code becouse when user get this email they can see look like this "Hi , bhavesh Your RCNO is 1234 Thank you for showning intrasted and registration Please click hear to activate your account and enjoy our services \\n Thank you."; 我有这个代码用c#脚本语言,现在我想在这个代码中加粗“rcno”因为当用户收到这封电子邮件时他们可以看到这样的“嗨,bhavesh你的RCNO是1234谢谢你显示内部注册和注册请点击听到激活您的帐户并享受我们的服务\\ n谢谢。“;

hear i want 1234 in bold, so how can i do it in coding?? 听到我想用粗体1234,所以我怎么能在编码?

Use <strong> : 使用<strong>

msg.Body = "Hi , " + txtrfname.Text.Trim() + "!\n" + 
   " Your RCNO is <strong>" + rcno + "</strong>!\n Thank you for 
   showning intrasted and registration Please <a href='" + activationurl + 
   "'>click hear to activate </a> your account and enjoy our services \n Thank you.";

The HTML Strong Element <strong> gives text strong importance, and is typically displayed in bold. HTML强元素<strong>赋予文本强烈的重要性,通常以粗体显示。


Side Note: 边注:

Another possibility is to use <b> . 另一种可能性是使用<b> See the difference here . 看到这里的差异。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM