Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
チェックボックスを使用して、選択したチェックボックスの値を取得したいページ数のグリッドビューがあります。さまざまなページで選択されたチェック ボックスから値を取得する方法がわかりません。これに関する提案とコーディングを教えてください。
これを使って
protected void btnClick_Click(object sender, EventArgs e) { StringBuilder sbQuery = new StringBuilder(); bool flag = false; foreach (GridViewRow row in gridview1.Rows) { if (((CheckBox)row.FindControl("chk")).Checked) { flag = true; //------ } } }