I'm trying to use smtp to send email to the revelant people in the database. I have set a SQL condition to send to certain people. However, my datareader looping does not work. Initially i put
if (dr.HasRows)
{
dr.Read();
But it only reads the first row of my column but not the others.
Here is my smtp code
protected void btnAssign_Click1(object sender, EventArgs e)
{
if (tbdetails.Text.Equals(""))
{
lblmsg.ForeColor = System.Drawing.Color.Red;
lblmsg.Text = "Please ensure that you have selected a Member Report ID";
}
else if (ddllocation.SelectedItem.Text.Equals("Select Location"))
{
lblmsg.ForeColor = System.Drawing.Color.Red;
lblmsg.Text = "Please ensure that a location has been selected to ...
Go to the complete details ...