此:
"<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
答案 0 :(得分:0)
您应该将其附加到href
属性中,例如:
"<a href='http://localhost:6171/activity/index/?Id=" + x.EmpId + "&date="
+ DateTime.Today.Date.ToShortDateString() + "'>Click Me</a>";