Create table by using string builder.
protected void btnInsert_Click(object sender, EventArgs e)
{int retcount = 0;
List
for (int i = 0; i < chkSeat.Items.Count; i++)
{
if (chkSeat.Items[i].Selected == true)
{
list.Add(chkSeat.Items[i].Text + "_"; + chkSeat.Items[i].Value);
}
}
string[] array = list.ToArray();
sb.Append(");
sb.Append("
");
sb.Append("");
");
sb.Append("
sb.Append("
| "); sb.Append(" " + array[retcount]); ");sb.Append(" sb.Append( | );"); sb.Append(" | ");
sb.Append("
");
Literal1.Text = sb.ToString();
Literal1.Text = sb.ToString();
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Joginder BangerPosted Nov 13, 2014, 12:28 AM
check below code it may be some help you.
StringBuilder sb = new StringBuilder();
if (showResult.Rows.Count > 0)
{
link.Visible = true;
sb.Append("
sb.Append("
sb.Append("
sb.Append("
sb.Append("
sb.Append("
//sb.Append("
//sb.Append("
//sb.Append("
//sb.Append("
sb.Append("
for (int i = 0; i < showResult.Rows.Count; i++)
{
link.Visible = true;
sb.Append("
sb.Append("
sb.Append("
sb.Append("
}
sb.Append("
sb.Append("
sb.Append("
sb.Append("
lblerror.Text = sb.ToString();