Reputation: 193
I want to send a gridview selected row in C# with Session.
I try to save the row like this:
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
Session["try"] = GridView1.SelectedRow;
Response.Redirect("ProjectInformation.aspx");
}
Then , in ProjectInformation.aspx i want to retrieve the row from the Session but i dont know how to do it . can anyone help please?
Upvotes: 1
Views: 1219
Reputation: 1838
Can you please try this in the pageload of your redirected page..
GridViewRow a = (GridViewRow)Session["try"];
Give Header file using System.Web.UI.WebControls;
Upvotes: 2