system.web.mail not found
-
Hey, This is my first post here so lemmy start with thanks to all the contributors here. I have learned allot from the code hosted here. My problem is with system.web.mail. When I try to import system.web.mail with (Imports System.Web.Mail) I get squiglys telling me that "namespace or type (mail) for imports system.web.mail cannot be found. I have searched both here and on msdn and found examples useing.. Imports System Imports System.Web.Mail and have try to copy/paiste them into visual studio as both windows application and console application and always get the error. Is it that my library is incomplete or has this namespace been replaced by something else or what? Thanks in advance for you're help EDIT: If it helps anyone to see what I meen here is a link to the namespace info on msdn. Also I should have mentioned that I tried calling smtpMail.send useing the full path (System.Web.Mail.smtpMail.send() ) and it still sais it doesn't exist. :mad: 2 U.S. coins equal 30 cents and one is NOT a nickle. Hmm..
-
Hey, This is my first post here so lemmy start with thanks to all the contributors here. I have learned allot from the code hosted here. My problem is with system.web.mail. When I try to import system.web.mail with (Imports System.Web.Mail) I get squiglys telling me that "namespace or type (mail) for imports system.web.mail cannot be found. I have searched both here and on msdn and found examples useing.. Imports System Imports System.Web.Mail and have try to copy/paiste them into visual studio as both windows application and console application and always get the error. Is it that my library is incomplete or has this namespace been replaced by something else or what? Thanks in advance for you're help EDIT: If it helps anyone to see what I meen here is a link to the namespace info on msdn. Also I should have mentioned that I tried calling smtpMail.send useing the full path (System.Web.Mail.smtpMail.send() ) and it still sais it doesn't exist. :mad: 2 U.S. coins equal 30 cents and one is NOT a nickle. Hmm..
Add a reference to System.Web in your project Charlie if(!curlies){ return; }
-
Add a reference to System.Web in your project Charlie if(!curlies){ return; }
I can import system.web and can also reference it from inside other classes etc. the squigly lines show up when I add .mail or when I try to use anything or these dudes (MailAttachment MailFormat MailPriority MailEncoding MailMessage SmtpMail ) I admit I am a vb.net newb but I have checked and rechecked my syntax and spelling etc even going as far as to copy and paste example code from msdn and even downloaded some project files useing the class and always get the squiggly lines and compile time errors. Its like it isn't there. Is there a way to download the full library? I'm guessing my library is incomplete or corrupted. I just installed a fresh visual studio .net enterprise archetect from an unopened retail box. (still in the plastic) For example I can start a new visual basic - console application and paiste the code directly from this msdn page and get the same problem. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebmailsmtpmailclasstopic.asp 2 U.S. coins equal 30 cents and one is NOT a nickle. Hmm..
-
I can import system.web and can also reference it from inside other classes etc. the squigly lines show up when I add .mail or when I try to use anything or these dudes (MailAttachment MailFormat MailPriority MailEncoding MailMessage SmtpMail ) I admit I am a vb.net newb but I have checked and rechecked my syntax and spelling etc even going as far as to copy and paste example code from msdn and even downloaded some project files useing the class and always get the squiggly lines and compile time errors. Its like it isn't there. Is there a way to download the full library? I'm guessing my library is incomplete or corrupted. I just installed a fresh visual studio .net enterprise archetect from an unopened retail box. (still in the plastic) For example I can start a new visual basic - console application and paiste the code directly from this msdn page and get the same problem. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebmailsmtpmailclasstopic.asp 2 U.S. coins equal 30 cents and one is NOT a nickle. Hmm..
The Imports keyword is only a coding shortcut. For example, adding
Imports System.Windows.Forms
at the top of your source code file allows you to typeDim myForm as New Form
instead ofDim myForm as new System.Windows.Forms.Form
If you want to use a class in an assembly that's not referenced by default, you have to add that reference manually. To do so, right click on the References folder in your project (in the Solution Explorer) and click Add Reference. Scroll down until you find the one you're looking for (System.Web in this case), double-click it and click OK. Now you can use any of the classes defined in that assembly in your code. Charlie if(!curlies){ return; } -
The Imports keyword is only a coding shortcut. For example, adding
Imports System.Windows.Forms
at the top of your source code file allows you to typeDim myForm as New Form
instead ofDim myForm as new System.Windows.Forms.Form
If you want to use a class in an assembly that's not referenced by default, you have to add that reference manually. To do so, right click on the References folder in your project (in the Solution Explorer) and click Add Reference. Scroll down until you find the one you're looking for (System.Web in this case), double-click it and click OK. Now you can use any of the classes defined in that assembly in your code. Charlie if(!curlies){ return; }Thank you very much. I actualy found my solution yesterday BUT that is exactly what I wasn't doing and you are the only person who responded and tried to help so I DO apriciate the help. This was my first application and as part of my course I was to write something that I felt was usefull while small and make myself find everything I needed to know to get it done. Not the usualy first exercise in a course but very usefull. I lurned allot of the basics and this way they will stick, since I spent so much time finding each. Again Thanks, Harley 2 U.S. coins equal 30 cents and one is NOT a nickle. Hmm..