![](/img/trans.png)
[英]Can I change my datagridview cell font style based on a condition?
[英]How can I change the font style of a string?
我有一個字符串要發送到電子郵件服務器,作為電子郵件的正文。 我試圖控制它將最終顯示在電子郵件中的字體。 這是字符串:
@"Dear " + txtName.Text + ",<br/><br/>Thank you for submitting. <br/><br/>In the event of any changes, please submit again here" + link + ". <br><br>The following is a summary for your records.<br/><br/>"
我將如何制作字體,例如Times New Roman?
似乎所有有關字體更改的信息總是涉及使用ASP控件,但是在這種情況下,這是不可能的。
要更改字體系列 ,必須使用CSS 。
string mail = @"Dear " + txtName.Text + ",<br/><br/>Thank you for submitting. <br/><br/>In the event of any changes, please submit again here" + link + ". <br><br>The following is a summary for your records.<br/><br/>"
例如,使用Time New Roman
:
mail = "<p><span style=\"font-family: Time New Roman;\">" + mail + </span></p>"
如果客戶端沒有第一個字體,您應該知道可以使用其他字體:
font-family: Times, "Times New Roman", Georgia, serif;
如果您需要有關郵件格式的更多提示,請執行以下操作:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.