For one thing, that's completely unreadable. For another, you either have to use single quotes around the various html attribute values or escape the double quotes.
sb.AppendLine ("<table width='100%' cellspacing='0' cellpadding='2'>");
sb.AppendLine (" <tbody>");
sb.AppendLine (" <tr>");
sb.AppendLine (" <td colspan='4'></td>");
sb.AppendLine (" </tr>");
sb.AppendLine (" <tr><td></td><td></td><td></td> <td></td></tr>");
sb.AppendLine (" <tr><td style='font-size:10px;' colspan='4'>TSW Packaging Solutions</td></tr>");
sb.AppendLine (" <tr><td style='font-size:10px;' colspan='4'>S No 8, Sagun Niwas Dange Chowk – Tathawade Road, Tathawade, Pune - 411033</td></tr>");
sb.AppendLine (" <tr>");
sb.AppendFormat(" <td style='font-size:10px;' colspan='2'> REF :- {0}</td>", lblticket.Text);.AppendLine();
sb.AppendFormat(" <td style='font-size:10px;' colspan='2'>Date :- {0}</td>", System.DateTime.Today);.AppendLine();
sb.AppendLine (" </tr>");
sb.AppendLine (" <tr>");
sb.AppendFormat(" <td style='font-size:10px;' colspan='4'> Kind Attn :- {0}</td>", lblcustomer.Text);.AppendLine();
sb.AppendLine (" </tr>");
sb.AppendLine (" <tr>");
sb.AppendFormat(" <td style='font-size:10px;' colspan='4'> M/S. :- {0}</td>", lblcompany.Text).AppendLine();
sb.AppendLine (" </tr>");
sb.AppendLine (" <tr>");
sb.AppendFormat(" <td style='font-size:10px;' colspan='4'> Subject :- {0}</td>", txtsubject.Text).AppendLine();
sb.AppendLine (" </tr>");
sb.AppendLine (" <tr>");
sb.AppendFormat(" <td style='font-size:10px;' colspan='4'> {0}</td>", txtbody.Text).AppendLine();
sb.AppendLine (" </tr>");
sb.AppendLine (" <tr>");
sb.AppendLine (" </tr>");
sb.AppendLine (" </tbody>");
sb.AppendLine ("</table>");
I don't know what the
productbind
method does.
EDIT ===============================
Your responses are STILL too vague for precise help, but this should be what you're looking for. I can't possibly spoon feed you more than this because you're piece-mealing the info to us and frankly, I'm bored with the question. Be a programmer and nut it out from here.
var product = productbind();
sb.AppendFormat(" <td style='font-size:10px;'>{0}</td>", product.field1).AppendLine();
sb.AppendFormat(" <td style='font-size:10px;'>{0}</td>", product.field2).AppendLine();
sb.AppendFormat(" <td style='font-size:10px;'>{0}</td>", product.field3).AppendLine();
sb.AppendFormat(" <td style='font-size:10px;'>{0}</td>", product.field4).AppendLine();