Click here to Skip to main content
15,867,838 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am trying to send information people provide in a form in an email to myself. The goal is to have people enter in account information which will be sent to an employee who can later update a database. Here is the code behind I have so far but I am having an issue with my "handles myBase.load" in which it says "the event load cannot be found". Does anyone know what may be wrong?

Sidenote: I know I am supposed to add something in network credentials but I did not want to add my email and password to a post.

Thanks in advance for your help.

What I have tried:

Imports System.Net.Mail

Partial Class signUp


Private Sub signUp_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.load


End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click

Dim Smtp_Server As New SmtpClient
Dim e_mail As New MailMessage()

Smtp_Server.UseDefaultCredentials = False
Smtp_Server.Credentials = New Net.NetworkCredential("", "")
Smtp_Server.Port = 587
Smtp_Server.EnableSsl = True
Smtp_Server.Host = "smtp.gmail.com"

e_mail = New MailMessage()
e_mail.From = New MailAddress(txtUsername.Text)
e_mail.To.Add(TextBox2.Text)
e_mail.Subject = "Client Account Information"
e_mail.IsBodyHtml = False
e_mail.Body = txtUsername.Text
Smtp_Server.Send(e_mail)




End Sub

End Class
Posted
Updated 26-Apr-17 22:02pm
Comments
[no name] 26-Apr-17 21:34pm    
Might be helpful to know what "MyBase" is.

1 solution

Your signUp class does not have an explicit base class so it is based on the Object Class (System)[^] which does not have a load method.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900