如何在单击激活链接时调用 CreateOutlookContacts 函数..
Outlook功能代码如下
mailItem.HTMLBody = "
你好,
欢迎来到通讯录世界......
请点击以下链接将我的联系人添加到您的通讯录中
“激活链接”
**//my function which i want to call on activation link**
Public Function CreateOutlookContacts(ByVal Sid As Integer) As Boolean
Try
Dim sql As String = "select * from SubscriberProfile"
Dim connectionString As String = _ "Data Source=c211\c211;Initial Catalog=Ctc;User ID=sa;Password=sa"
Dim sqlconn As New SqlConnection(connectionString)
sqlconn.Open() ' Sets up the connection, it is closed here
NewContact.FileAs = "arnav chauhan"
NewContact.Email1Address = "arnav.chauhan@gmail.com"
NewContact.Email2Address = "abc@live.com"
NewContact.MailingAddress = "Meerut UP, India"
NewContact.Subject = "Contact crated from vb.net"
NewContact.JobTitle = "Software Engineer"
NewContact.Save()
Next
end function