Hi I have a page that has a load of check boxes, when one is selected the user then clicks the button to go to a new page. 我需要這個(gè)新頁面來包含從上一頁中選擇的記錄的 ID。我不知道如何將名為 FileID 的 ID 的 int 值放入下一個(gè)名為 EditFile.aspx 的頁面中。我這個(gè)函數(shù)的所有代碼目前都在一個(gè) buttonclick 事件中:protected void btnEditSelectedFile_Click(object sender, EventArgs e){ int intSelectedFileCount = 0; foreach (GridDataItem item in fileRadGrid.MasterTableView.Items) { int FileID = int.Parse(fileRadGrid.MasterTableView.DataKeyValues[item.DataSetIndex - (fileRadGrid.CurrentPageIndex * fileRadGrid.PageSize)]["FileID"].ToString()); //Gets File ID of Selected field CheckBox chk = (CheckBox)item["AllNone"].Controls[0]; if (chk.Checked) { intSelectedFileCount++; } } if (intSelectedFileCount == 1) { Response.Redirect("EditFile.aspx", false); } else { lblNeedSingleFile.Visible = true; }}任何有關(guān)如何在 EditFile 頁面中訪問“FileID”的幫助將不勝感激!
- 2 回答
- 0 關(guān)注
- 220 瀏覽
添加回答
舉報(bào)
0/150
提交
取消
