Posts: 2,216
Threads: 187
Joined: Jul 2011
01-15-2012, 09:13 AM
(This post was last modified: 01-15-2012, 09:20 AM by BreShiE.)
Trying to make a contact form for my new program that I'm making, and for some reason the following is showing up as an error:
Code:
Imports System.Net.Mail 'DERP it's System.Net.Mail
Imports System.Text
Public Class Contact
Inherits System.Web.UI.Page 'errors
End Class
Posts: 2,216
Threads: 187
Joined: Jul 2011
01-15-2012, 09:33 AM
(This post was last modified: 01-15-2012, 09:34 AM by BreShiE.)
(01-15-2012, 09:26 AM)KoBE Wrote: You should ask questions like this on TLF.. you might get them answered quicker.
You need to add the System.Web reference into your project.
I had it as System.Web.Mail but that errored, so I changed it to System.Net.Mail.
(01-15-2012, 09:26 AM)KoBE Wrote: You should ask questions like this on TLF.. you might get them answered quicker.
You need to add the System.Web reference into your project.
I just added Imports System.Web, but "Inherits System.Web.UI.Page" still errors. "Type 'System.Web.UI.Page' is not defined."
Posts: 341
Threads: 34
Joined: Nov 2010
Reputation:
8
Did you add the System.Web reference? Also, this is for an ASP.Net project correct?
Posts: 2,216
Threads: 187
Joined: Jul 2011
01-15-2012, 10:52 AM
(This post was last modified: 01-15-2012, 10:54 AM by BreShiE.)
(01-15-2012, 10:42 AM)KoBE Wrote: Did you add the System.Web reference? Also, this is for an ASP.Net project correct?
No, as stated this is for Visual Basic 2010. Also, yes I did add the reference.
Posts: 2,216
Threads: 187
Joined: Jul 2011
I got it working, I just got rid of 'Inherits System.Web.UI.Page' and changed the SMTP server from gmail to hotmail. Works fine now!