.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Imran Ghani
Sohaib Khalid

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

mail sending

Posted By: Shweta     Posted Date: February 21, 2011    Points:2   Category :ASP.Net
while sending the mail,
error is occurring at the line :

using System.Web.Mail;
using System.Net.Mail;
using System.Net;

oMessage.To.Add(new MailAddress(hf.Value));

error:'string' does not contain a definition for 'Add' and no extension method 'Add' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)

How can i solve the problem?

Author: Jayakumar             
Posted Date: February 21, 2011     Points: 5   


post your code


Add' accepting a first argument of type 'string' could be found may be your argument
did not match

Name : R.Jayakumar(JK)
Email Id : kumaraspcode2009@gmail.com
Author: Sunil Yadav       [Moderator]      
Posted Date: February 21, 2011     Points: 5   


Check whether project has reference to System.Web assembly.

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend