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. I need this new page to have the ID of the record selected from the previous page in it.
I can't work out how to get the int value for the ID called FileID into the next page called EditFile.aspx.
All of my code for this function is currently inside a buttonclick event:
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;
}
}
Any help on how to access 'FileID' in EditFile page would be really appreciated!