c# - 在 C# 的编码端使用粗体

标签 c# asp.net

hii friend ,我有一个问题,请尝试解决这个问题

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.";

我在 C# 脚本语言中有这段代码,现在我想在这段代码中加粗“rcno”,因为当用户收到这封电子邮件时,他们可以看到如下所示 “您好,bhavesh 您的 RCNO 是 1234 感谢您显示 intrasted 和注册 请单击“收听”以激活您的帐户并享受我们的服务\n 谢谢。”;

听说我想要粗体的 1234, 那么我该如何在编码中做到这一点呢??

最佳答案

使用 <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.


旁注:

另一种可能性是使用 <b> .查看区别 here .

关于c# - 在 C# 的编码端使用粗体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37096899/

相关文章:

c# - InvalidArgument= '0' 的值对于 'SelectedIndex' 无效。参数名称 : SelectedIndex

c# - 具有很多 if else block 的功能。这些可以去掉吗

javascript - 检查是否启用了 Javascript,如果未使用 asp 自定义控件,则显示一条消息

asp.net - 如何修复 "' System.Security.Permissions.SecurityAction.RequestMinimum' is obsolete” 编译错误?

c# - Asp.net 核心 webapi 获取从 Angular4 应用程序发布的空值

C# IE11 自动化 - 仅给定窗口句柄设置 Doc 表单元素

c# - 从 .NET 代码中提取数据

asp.net - 下载带有 "save as"的文件

c# - 使用泛型检查默认值

jquery - 更改选项卡时,不会触发复选框的更改事件