Amit Kumar

Amit Kumar

  • NA
  • 2
  • 975

i want to change 2nd row value

Jul 29 2016 9:56 AM
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
public partial class Task18 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btn1_Click(object sender, EventArgs e)
{
Int32 a = Convert.ToInt32(txt1.Text);
Int32 b = Convert.ToInt32(txt2.Text);
Int32 d = Convert.ToInt32(txt3.Text);
Int32 c = b - a;
String k;
StringBuilder sb = new StringBuilder();
sb.Append("<table border='1'>");
for (int m = 1; m <= d; m++)
{
sb.Append("<tr>");
for (Int32 j = a; j <= b; j++)
{
sb.Append("<td>");
k = Convert.ToString(j);
sb.Append(k);
sb.Append("</td>");
}
sb.Append("</tr>");
}
sb.Append("</table>");
ltl1.Text = sb.ToString();
}
}

Answers (1)