TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ekrem Tapan
NA
967
81.7k
asp.net avoid duplicates in string builder
May 19 2015 10:40 PM
hello everbody, i have a some problem on my code,
i want get data from mssql, after get data put my table inside but i have a some problem,same data getting two times<br>
StringBuilder sb = new StringBuilder();
foreach (Coffee coffee in coffeeList)
{
sb.Append(string.Format(@"<table>
<tr>
<td rowspan='6'><img runat='server' src='{6}' /></td>
<td>Name :</span></td>
<td>{0}</td>
<td rowspan='6'><img runat='server' src='{6}' /></td>
<td>Name :</span></td>
<td>{0}</td>
</tr>
<tr>
<td>Type:</td>
<td>{1}</td>
<td>Type:</td>
<td>{1}</td>
</tr>
<tr>
<td>Price:</td>
<td>{2}</td>
<td>Price:</td>
<td>{2}</td>
</tr>
<tr>
<td>Roast:</td>
<td>{3}</td>
<td>Roast:</td>
<td>{3}</td>
</tr>
<tr>
<td>Origin:</td>
<td>{4}</td>
<td>Origin:</td>
<td>{4}</td>
</tr>
<tr>
<td>Description:</td>
<td>{5}</td>
<td>Description:</td>
<td>{5}</td>
</tr>
</table>",
products.Name, products.Type, products.Price, products.Roast, products.Country, products.Review, products.Image));
}
Reply
Answers (
2
)
upload and feedback
How to set buttion text in multiline in asp.net