Himanshu Tyagi

Himanshu Tyagi

  • 1.5k
  • 119
  • 15k

No overload for method 'createassociateemailbody' takes 2 ar

May 19 2018 1:49 AM
string strAssociateBody = this.createAssociateEmailBody(lblClientName.Text, lblPhoneNo.Text, strFinalAddress, dblAssociatePrice);
this.createAssociateEmailBody("New Order from Associate Clients!", strAssociateBody);
  
i am getting error on
 
this.createAssociateEmailBody("New Order from Associate Clients!", strAssociateBody);
 
while i have passed all variables...
 
private string createAssociateEmailBody(string strUserName, string strPhoneNo, string strAddress, double dblAssociatePrice)
{
StringBuilder strAdd = new StringBuilder();
strAdd.Append(lblFinalAddressUserName.Text + ",");
strAdd.Append(lblFinalAddressFlatNo.Text + ",");
strAdd.Append(lblFinalAddresLandmark.Text + ",");
strAdd.Append(lblFinalCity.Text + ",");
string strFinalAddress = strAdd.ToString();
string strBody = string.Empty;
//using streamreader for reading my htmltemplate
using (StreamReader reader = new StreamReader(Server.MapPath("~/Forms/Email.html")))
{
strBody = reader.ReadToEnd();
}
strBody = strBody.Replace("{UserName}", strUserName); //replacing the required things
strBody = strBody.Replace("{PhoneNo}", strPhoneNo);
strBody = strBody.Replace("{Address}", strAddress);
strBody = strBody.Replace("{AssociateTotal}", dblAssociatePrice.ToString());
return strBody;
}

Answers (2)