size but it is still missing part of the string.
Here is the codebehind:
public System.Text.StringBuilder BindData(System.DateTime SDate,
System.DateTime EDate)
{
string strEventSelect="SELECT EVNR_tbl.* FROM EVNR_tbl, img_tbl WHERE
EVNR_tbl._Date BETWEEN '" + SDate.ToString("yyyy/MM/dd") + "' AND '" +
EDate.ToString("yyyy/MM/dd") + "' ORDER BY EVNR_tbl._Date ASC";
clubconn=new SqlConnection(strclubconn);
clubconn.Open();
dsClub=new DataSet();
clubadapt=new SqlDataAdapter(strEventSelect,clubconn);
clubadapt.FillSchema(dsClub,SchemaType.Source,"EVNR_tbl");
clubadapt.Fill(dsClub,"EVNR");
MailString=new System.Text.StringBuilder(5000);
// Set Email Body.
MailString.Append("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0
Transitional//EN' >");
MailString.Append("<HTML>");
MailString.Append("<HEAD>");
MailString.Append("<meta name='GENERATOR' Content='Microsoft Visual
Studio .NET 7.1'>");
MailString.Append("<meta name='CODE_LANGUAGE' Content='C#'>");
MailString.Append("<meta name='vs_defaultClientScript'
content='JavaScript'>");
MailString.Append("<meta name='vs_targetSchema'
content='http://schemas.microsoft.com/intellisense/ie5'>");
MailString.Append("</HEAD>");
MailString.Append("<body MS_POSITIONING='GridLayout' bgColor='black'>");
MailString.Append("<form id='Form1' method='post' runat='server'>");
MailString.Append("<table borderColor='#ffffff' cellSpacing='0'
cellPadding='0' width='500' align='center' border='1'>");
MailString.Append("<tr>");
MailString.Append("<td>");
MailString.Append("<table cellSpacing='0' cellPadding='0' width='100%'
border='0'>");
MailString.Append("<tr>");
MailString.Append("<td colspan='2'><IMG
SRC='http://www.sonar.bc.ca/images/Header.jpg'></td>");
MailString.Append("</tr>");
MailString.Append("<tr>");
MailString.Append("<td colspan='2' style='HEIGHT: 48px'>");
MailString.Append("<table cellpadding='10' cellspacing='0' border='0'
width='100%'>");
MailString.Append("<tr>");
MailString.Append("<td style='FONT-SIZE: 10px; COLOR: white; FONT-FAMILY:
Verdana'>" + EMessage + "</td>");
MailString.Append("</tr>");
MailString.Append("</table>");
MailString.Append("</td>");
MailString.Append("</tr>");
MailString.Append("<tr>");
MailString.Append("<td>");
MailString.Append("<table cellpadding='10' cellspacing='0' border='0'
width='100%'>");
MailString.Append("<tr>");
MailString.Append("<td style='FONT-SIZE: 10px; WIDTH: 251px; COLOR:
white; FONT-FAMILY: Verdana' vAlign='Top'>");
DataTable dt=dsClub.Tables["EVNR"];
foreach(DataRow dr in dt.Rows)
{
MailString.Append(System.Convert.ToDateTime(dr["_Date"]) + " " +
dr["EventTitle"] + "<br>");
MailString.Append(dr["Description"].ToString().Replace("\n","<br>").Trim() + "<br>");
MailString.Append("For more details press <a
href='http://www.sonar.bc.ca/EventCalendar.aspx'> here </a>" + "<br>");
}
MailString.Append("</td>");
MailString.Append("<td style='FONT-SIZE: 10px; COLOR: white; FONT-FAMILY:
Verdana' vAlign='top'>");
foreach(ListItem i in IMGList.Items)
{
if(i.Selected)
{
MailString.Append("<img src='http://www.sonar.bc.ca/BroadcastIMG/" +
i.Text + "'" + ">" +"<br>");
}
}
MailString.Append("</td>");
MailString.Append("</tr>");
MailString.Append("</table>");
MailString.Append("</td>");
MailString.Append("</tr>");
MailString.Append("</table>");
MailString.Append("</td>");
MailString.Append("</tr>");
MailString.Append("</table>");
MailString.Append("</form>");
MailString.Append("</body>");
MailString.Append("</HTML>");
return MailString;
}
if someone can tell me what I am doing wrong I'd greatly appreciate it.
Thank you,probaly a mismatched quote ...
check this line
MailString.Append("<img src='http://www.sonar.bc.ca/BroadcastIMG/" +
i.Text + "'" + ">" +"<br>");
probaly a mismatched quote ...
check this line
MailString.Append("<img src='http://www.sonar.bc.ca/BroadcastIMG/" +
i.Text + "'" + ">" +"<br>");
What part is exactly missing?
Gabriel Lozano-Morn
What part is exactly missing?
Gabriel Lozano-Morn
0 comments:
Post a Comment