请问如何通过一个带有函数的函数的链接来传递函数
Dim Email As String = "ultimadan@hotmail.com"
Dim msgBody As New StringBuilder()
msgBody.Append("Thank you, please click the link below.")
msgBody.Append("<a href=http://localhost:49789/Seller/Part1/Default.aspx?" & GetUserID(Email))
答案 0 :(得分:1)
看起来你只是没有构建完整的锚标签。您缺少查询字符串值的键,您没有关闭标记等。您当前的代码可能会产生如下内容:
<a href=http://localhost:49789/Seller/Part1/Default.aspx?123
哪个不是完整或有效的HTML。你的意思是更像这样吗?:
msgBody.Append(
"<a href=""http://localhost:49789/Seller/Part1/Default.aspx?userid="
& GetUserID(Email)
& """>click here</a>"
)
哪个应该产生更像:
<a href="http://localhost:49789/Seller/Part1/Default.aspx?userid=123">click here</a>