Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why Is This Not Working D:< (VB,NET)
#1
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
Reply
#2
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.
Reply
#3
(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."
Reply
#4
Did you add the System.Web reference? Also, this is for an ASP.Net project correct?
Reply
#5
(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.
Reply
#6
(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
Reply
#7
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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)