Support Forums
Why Is This Not Working D:< (VB,NET) - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: Why Is This Not Working D:< (VB,NET) (/showthread.php?tid=24593)



Why Is This Not Working D:< (VB,NET) - BreShiE - 01-15-2012

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



RE: Why Is This Not Working D:< (VB,NET) - KoBE - 01-15-2012

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.


RE: Why Is This Not Working D:< (VB,NET) - BreShiE - 01-15-2012

(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."


RE: Why Is This Not Working D:< (VB,NET) - KoBE - 01-15-2012

Did you add the System.Web reference? Also, this is for an ASP.Net project correct?


RE: Why Is This Not Working D:< (VB,NET) - BreShiE - 01-15-2012

(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.


RE: Why Is This Not Working D:< (VB,NET) - AceInfinity - 01-15-2012

(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


RE: Why Is This Not Working D:< (VB,NET) - BreShiE - 01-16-2012

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!