如何在我的asp.net代码中设计我的html代码?

时间:2019-03-12 10:34:04

标签: html asp.net vb.net

如何在vb.net代码的HTML代码中添加一些设计? 我想更改body标签内的字体设计,因为body标签中的文本会向用户发送电子邮件地址。您的帮助将不胜感激。

这是我的代码:

    mail.Subject = "SYSTEM REQUEST FORM " & txtRequestTitle.Text & " " & Format(Now(), "MM/dd/yyyy").ToString
                        mail.IsBodyHtml = True
                        mail.Body = "<html>" & _
                           "<body>" & _
                                "Dear " & DropDownApprover.Text & ",<br><br>" & _
                                "" & "The following request has been created and need your approval" & "<br>" & _
                                "" & "===============================================" & "<br>" & _
                                "" & "http://10.190.193.162/ITrequestform/LoginPage.aspx" & "<br>" & _
                                "" & "===============================================" & "<br>" & _
                                "" & "Requested By: " & lblName.Text & "<br>" & _
                                "" & "Need to Approve By: " & DropDownApprover.Text & "<br>" & _
                                "" & "===============================================" & "<br>" & _
                                "" & "Request Title: " & txtRequestTitle.Text & "<br>" & _
                                "" & "Request Category: " & DropDownCateg.Text & "<br>" & _
                                "" & "Request Item: " & DropDownCateg2.Text & "<br>" & _
                                "" & "Date Needed: " & txtDateNeeded.Text & "<br>" & _
                                "" & "===============================================" & "<br>" & _
                                "" & "For Employee: " & txtRequestEmp.Text & "<br>" & _
                                "" & "Position: " & txtEmpPost.Text & "<br>" & _
                                "" & "Description of Request: " & txtDescription.Text & "<br>" & _
                                "" & "Justification of Request: " & txtJustification.Text & "<br>" & _
                                "" & "<br>" & _
                                "Thanks," & "<br>" & _
                                "HKT Teleservices""<br>" & _
                            "</body>" & _
                          "</html>"

1 个答案:

答案 0 :(得分:1)

在项目中添加CSS : 在SolutionExplorer中->右键单击o项目->添加现有项目,然后选择样式表(CSS)。

在ASPX页面中使用CSS : 您需要在ASPX页面中为此CSS文件添加引用。

<link href="Stylesheet.css" rel="stylesheet" type="text/css" />

任何要应用于正文的样式,都可以在下面的代码中编写 然后在Stylesheet.css文件中,编写此代码

body{
    font-family:"Helvetica Neue" , "Lucida Grande" , "Segoe UI";
    font-size:20px;
}