gpt4 book ai didi

javascript - 在 HTML 电子邮件中使用 href 传递参数 c# MVC

转载 作者:行者123 更新时间:2023-11-28 14:15:21 24 4
gpt4 key购买 nike

我正在尝试使用我的 MVC Javascript 应用程序发送电子邮件。目前电子邮件正在发送,我的 href 可以单击并重定向到正确的链接。但我的问题是如何使用 href 传递参数

emailBody += @"
</tbody>
</table>
<br />
<h3><b>Currently Data;</b></h3>
<table>
<thead>
<tr style='color: #ed5565; text-align: center'>
<th>Completed Date</th>
<th>Category</th>

</tr>
</thead>
<tbody>";

for (int i = 0; i < result3.Count; i++)
{
emailBody += @"
<tr style='text-align: center'>
<a href='http://myTestLink.com/Forms/Upload/' + result3[i].FormID >
<td>" + result3[i].CompletedDate + @"</td>
<td>" + result3[i].FormCategory + @"</td>

</a>
</tr>";
}

最佳答案

这适用于 href 属性:"' ... '"

emailBody += @"
</tbody>
</table>
<br />
<h3><b>Currently Data;</b></h3>
<table>
<thead>
<tr style='color: #ed5565; text-align: center'>
<th>Completed Date</th>
<th>Category</th>

</tr>
</thead>
<tbody>";

for (int i = 0; i < result3.Count; i++)
{
emailBody += @"
<tr style='text-align: center'>
<a href="'http://myTestLink.com/Forms/Upload/'" + result3[i].FormID + ">
<td>" + result3[i].CompletedDate + @"</td>
<td>" + result3[i].FormCategory + @"</td>

关于javascript - 在 HTML 电子邮件中使用 href 传递参数 c# MVC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57752510/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com