Click here to Skip to main content
15,906,626 members

Comments by Member 14719027 (Top 3 by date)

Member 14719027 17-Jan-20 6:02am View    
//this is the mail side part.Where the Maild-body content has been written

body = body.Replace("{ServerIDs}", Convert.ToString(emailContent.Rows[0]["Server_ID"])); //Server_ID is an database coloumn name
body = body.Replace("{IPs}", Convert.ToString(emailContent.Rows[0]["IP_Address"])); //IP_Address is an database coloumn name


//this is my dataclass page, where i needed the values dynamically from mail side part
TBDData tb = new TBDData();
DataTable dt = new DataTable();

dt.Columns.Add("Server_ID");
dt.Columns.Add("IP_Address");

DataRow dr = dt.NewRow();
dr["Server_ID"] = " " ; //here
dr["IP_Address"] = " "; //here
dt.Rows.Add(dr);


objMail.Mail(tb, dt, "notification.html");
Member 14719027 17-Jan-20 5:52am View    
values means whatever the data in the database that i needed when i checking the checkbox.

Without typing the values in the datarow, i need to fetch the values automatically.
Member 14719027 17-Jan-20 5:04am View    
dr1[colName] = "value";

Without this "value" , i need to pass the values dynamically from one .cs to another, for email purpose

From this to,
body = body.Replace("{ip}", Convert.ToString(emailContent.Rows[0]["ip1"]));

this,
DataRow dr = dtemailcontent.NewRow();
dr["ip1"] = ***** ;