- protected void Vote_Click(object sender, EventArgs e) {
- SqlConnection sql = new SqlConnection(conf);
- try {
- foreach(GridViewRow row in voterslist.Rows) {
- CheckBox chk = (CheckBox) row.FindControl("votepoint");
- Label lblCount = (Label) row.FindControl("vote_lbl");
- if (chk.Checked) {
- String Sid = lblCount.Text;
- String nqry = "what command should i enter here? I want to increase the count of the data that i checked in checkbox after the button clicked ";
- SqlCommand cmd = new SqlCommand(nqry, sql);
- int i = cmd.ExecuteNonQuery();
- }
- }
- }
- sql.Open();
- }
Loading




Rajanikant HawaldarPosted Aug 25, 2019, 11:37 PM