I have a problem... stuck a bit...
I'm trying to get this confirmation link into the letter I'll send to my friends. I got the following code on the net but it just doesn't work.

I have Createuserwizard on my create acount page. This code is placed into CreateAccount.aspx.vb

I coloured places in code with red (where i get errors)

Thanks for help from anyone in advance!!


Imports System.IO
Imports System.Net.Mail

Partial Class Default3
Inherits System.Web.UI.Page
Protected Sub CreateUserWizard1_SendingMail(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MailMessageEventArgs) Handles CreateUserWizard1.SendingMail
Dim userInfo As MembershipUser = Membership.GetUser(CreateUserWizard1.UserName)

'Construct the verification URL
Dim verifyUrl As String = Request.Url.GetLeftPart(UriPartial.Authority) & Page.ResolveUrl("~/Verify.aspx?ID=" & userInfo.ProviderUserKey.ToString())

'Replace <%VerifyUrl%> placeholder with verifyUrl value
e.Message.Body = e.Message.Body.Replace("<%VerifyUrl%>", verifyUrl)
End Sub
End Class

I think I found it out Withevents was missing

Thanks all for your patience with me.