Как остаться на той же странице, если подкачка в gridview при нажатии кнопки назад с помощью C#
I have a GridView on ASP.NET web form which I have bound to a data source and set it to have 10 records per page. I also have a hyper link column on the GridView, such that a user can navigate to another page (details page) from the list. On the details page, they have "Back" button to return to the GridView page
I tried the below code but its not working <pre lang="c#">protected void GridViewIndexChanging(object sender, GridViewPageEventArgs e) { myGridView.PageIndex = e.NewPageIndex; Session["pageNumber"] = e.NewPageIndex; } if (!IsPostBack) { if (Session["pageNumber"] != null) { GridViewIndexChanged(myGridView, new GridViewPageEventArgs((int)Session["pageNumber"])); } }
Что я уже пробовал:
I tried the above code but its not working