在HTML中连接锚标记

时间:2018-01-16 07:16:41

标签: c# html datetime

此:

"<a href='http://localhost:6171/activity/index/?Id='" + x.EmpId + "&date=" + DateTime.Today.Date.ToShortDateString() + ">Click here</a>";

以邮件形式呈现邮件:

http://localhost:6171/activity/index/?Id=

它应该是这样的:

http://localhost:6171/activity/index/?Id=57&date=16/01/2018

1 个答案:

答案 0 :(得分:0)

您应该将其附加到href属性中,例如:

  "<a href='http://localhost:6171/activity/index/?Id=" + x.EmpId + "&date=" 
+ DateTime.Today.Date.ToShortDateString() + "'>Click Me</a>";
相关问题