我有一个用于邮件功能的 html 页面。我在 stringbuilder 类型的对象中获取它,在代码后面并替换值。
.htm 文件中有一个特定的行,我想在特定情况下通过代码隐藏。我怎样才能找到那行并隐藏。
.htm 行:
<TR bgcolor="E96F00">
<TD style="font-family: Arial; font-size: 14px; font-weight: Bold; color:White;">Course Content Link</TD>
</TR>
<TR>
<TD style="font-family: Calibri; font-size: 14px;">@CourseContent@<BR> </TD>
</TR>
<TR>
<TD style="font-family: Calibri; font-size: 14px; color:Red; font-weight:bold">Important: TD>
</TR>
我试图替换的代码后面的代码:
if (dt.Rows[0]["Type"].ToString() == "V")
{
if (dt.Rows[0]["CourseContentPath"].ToString() != string.Empty)
{
x.Replace("@CourseContent@", "<A href='" + CourseContentLink + "' target=_blank onclick='window.open(this.href, this.target,'height=1000px,width=1000px');
return false>Click here</A> to find the course content");
}
}
if (dt.Rows[0]["Type"].ToString() == "A")
{
}