Page + HTML

Page + HTML

Hello,
Here's the scenario,
Following Table is i am trying to achieve in page using searchString:
Design No.:      Shade No.:      Quantity:
55830              250                  100.00
56459              Blue                 50.00

But i am getting the result as follows:
Design No.:
Shade No.:
Quantity:
56459
Blue
50.00
55830
250
50.00
55830
250
100.00

Following is the code i used:


  1. <%{

  2. Table = "<head><style>table {font-family: arial,sans-serif;border-collapse: collapse;width: 2px;}td, th {border: 1px solid #dddddd;border: 1px solid black;text-align: left;padding: 8px;}tr:nth-child(even) {background-color: #dddddd;}</style></head><body><table><tr><th>Design No.:</th><th>Shade No.:</th><th>Quantity:</th></tr>";
  3. total = 0.0;
  4. fet_fabric = Fabric_Stock_Report[Order_No == input.orderNo];
  5. for each rec in fet_fabric
  6. {
  7. total = total + rec.Inward_Quantity;
  8. Table = Table + "<tr><td>" + rec.Design_No1.Design_No + "</td><td>"+ rec.Shade_No1.Shade_No + "</td><td>" + total + "</td></tr>";
  9. }
  10. Table = Table + "</table></body>";
  11. %>
  12. <%=Table%>
  13. <%
  14. }%>


I dont the duplication of values.
is that possible?