public partial class data_entry : System.Web.UI.Page { SqlDataAdapter da1; DataTable dt1; int i = 0; protected void Page_Load(object sender, EventArgs e) { string strcon = ConfigurationManager.ConnectionStrings["gallup"].ConnectionString; string next = "SELECT * from city_breakup"; da1 = new SqlDataAdapter(next, strcon); dt1 = new DataTable(); da1.Fill(dt1); } protected void btn_next_Click(object sender, EventArgs e) { if(i<dt1.Rows.Count-1){ i++; txtlcity.Text=dt1.Rows[i]["city"].ToString(); txtsample.Text = dt1.Rows[i]["sample"].ToString(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)