Support Forums

Full Version: Why Is This Not Working D:< (VB,NET)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
You should ask questions like this on TLF.. you might get them answered quicker. Big Grin

You need to add the System.Web reference into your project.
(01-15-2012, 09:26 AM)KoBE Wrote: [ -> ]You should ask questions like this on TLF.. you might get them answered quicker. Big Grin

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. Big Grin

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."
Did you add the System.Web reference? Also, this is for an ASP.Net project correct?
(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.
(01-15-2012, 10:52 AM)BreShiE Wrote: [ -> ]No, as stated this is for Visual Basic 2010. Also, yes I did add the reference.

ASP.NET is part of Visual Basic 2010 lol
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!