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


Top 5 Contributors of the Month
david stephan

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?


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

hi

post your code

error

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



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

Hi,

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
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

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