I try to display the table using StringBuilder but it does not work. It causes an error say "Object reference not set to an instance of an object" at sb.Append(string.Format(. Please help. Thank you.
foreach (Item item in list)
{
sb.Append(string.Format(
@"<table >
<tr>
<th rowspan ='6' width='150px'><img runat='server' src='{3}'/>
</th>
<th width='50px'>Title: </th>
<td>{0}</td>
</tr>
<tr>
<th>Price:</th>
<td>{1}</td>
</tr>
<tr>
<th>Available: </th>
<td>{2}</td>
</tr>
</table>", item.ItemAttributes.Publisher,item.ItemAttributes.ListPrice.ToString(), item.ItemAttributes.NumberOfItems, item.SmallImage.URL));
lblItemResponse.Text = sb.ToString();
}