Aung Ko

Aung Ko

  • NA
  • 1
  • 1k

How can I save div tap position to Sql database .Help me Sir

Nov 12 2014 11:54 PM
Create table by using string builder.
 
protected void btnInsert_Click(object sender, EventArgs e)
{
int retcount = 0;
List<string> list = new List<string>();
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(<link rel=\"stylesheet\" href=\"style.css\"; type=\"text/css\" media=\"screen\" /><script type=\"text/javascript"; src=\"redips-drag-min.js\"></script><script type=\"text/javascript\" src=\"script.js\"></script>");
sb.Append("<div id=\"drag\">");
sb.Append("<table id=\"tbl\">");
sb.Append("<colgroup><col width=100/><col width=100/><col width=100/><col width=100/><col width=100/></colgroup><tbody>");
int j = 1;

for (j = 1; j <= Convert.ToInt32(txtRow.Text); j++)
{
sb.Append("<tr>");
for (int i = 1; i <= Convert.ToInt32(txtColumn.Text); i++)
{
if (Convert.ToInt32(j) != Convert.ToInt32(txtInsertLine.Text))
{
try
{
sb.Append("<td>");
sb.Append("<div class=drag>" + array[retcount]);
sb.Append("</div>");
sb.Append(</td>);
retcount++;
}
catch (Exception ex)
{
lblError.Text = &quot;Not Enough Seat.&quot;;
return;
}
}
else
{
sb.Append("<td style=\"\">");
sb.Append("</td>");
}
}
sb.Append("</tr>");
}
sb.Append("</tbody></table>");
sb.Append("<div>");

Literal1.Text = sb.ToString();


Answers (1)