DataTable dt = GetUserTable();
if (dt.Rows.Count > 0)
{
foreach (DataRow row in dt.Rows)
{
string strTemplate;
strTemplate = "Hi [User_Name] " +
"Check out our new site at " +
"[Site_Address] " +
"and then enter your email address and access id which is [Site_ID]. " +
"We look forward to keeping in touch with you through our website. " +
"Kind Regards, " +
"[Customer_Name] ";
strTemplate = strTemplate.Replace("[User_Name]", row["UserName"].ToString());
strTemplate = strTemplate.Replace("[Site_Address]", row["SiteAddress"].ToString());
strTemplate = strTemplate.Replace("[Site_ID]", row["SiteID"].ToString());
strTemplate = strTemplate.Replace("[Customer_Name]", row["CustomerName"].ToString());
}
}
|