adamantium
New Member
On my asp.net c# page I have two text boxes(start and end dates) with ajax CalendarExtenders. The user selects a start date and then an end date. On selecting the end date, I bind my grid as shown below;\[code\] protected void calEndDate_TextChanged(object sender, EventArgs e) { BindGrid(); }\[/code\]In the grid I have a command button with the following code\[code\] protected void gvAllRoomStatus_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Manage") { GridViewRow row = gvAllRoomStatus.Rows[Convert.ToInt16(e.CommandArgument)]; int BookingID = Convert.ToInt32(row.Cells[1].Text); DataClassesDataContext context = new DataClassesDataContext(); Session["BookingID"] = BookingID; Response.Redirect("CheckIn.aspx"); } }\[/code\]When the user goes to that page and clicks the back button all the selected dates and the gridview data disappears. Any ideas why the viewstate is disappearing?