Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Compilation error (contact form)

$
0
0

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: CS0246: The type or namespace name 'NetworkCredential' could not be found (are you missing a using directive or an assembly reference?)


Line 29:             smtp.EnableSsl = true;
Line 30:             smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;Line 31: smtp.Credentials = new NetworkCredential(fromAddress, fromPassword); Line 32:             smtp.Timeout = 20000;
Line 33:         }

I am using this contact form: http://www.codeproject.com/Tips/371417/Send-Mail-Contact-Form-using-ASP-NET-and-Csharp

It works perfectly fine when i open only the contact form, but for some reason it doesnt work on my website...


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>