when in the first page, the hiddenvalue can be gotten. so, there is no problem but after the page index is changed , the hiddenfieldvalue cannot be gotten by user. İt shows error which is about "System.ArgumentOutOfRangeException" when trying to get hiddenvalue

```
(string sValue = ((HiddenField)GridView1.Rows[rowIndex].FindControl("HiddenField1")).Value;

```

asp side:

```
        <Columns>
           <asp:BoundField DataField="sayfa_adeti" HeaderText="SAYFA ADETİ"  ItemStyle-HorizontalAlign="Center" ItemStyle-Width="60px"></asp:BoundField>
              </asp:BoundField>

   <asp:HiddenField ID="HiddenField1" runat="server"Value='<%#Eval("ID")%>'</asp:HiddenField>   

  protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
    getOncekiFotokopiTalepler();//fillGrid
    GridView1.PageIndex = e.NewPageIndex;
    GridView1.DataBind();
}

```

c#side

```
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
    //int rowIndex = Convert.ToInt32(e.CommandArgument);
    int rowIndex = Convert.ToInt32(e.CommandArgument.ToString().Trim());

    if (e.CommandName == "Goruntule")
    {
        string sValue = ((HiddenField)GridView1.Rows[rowIndex].FindControl("HiddenField1")).Value;
        GridViewRow gvRow = GridView1.Rows[rowIndex];

        Session["SELECTED_FOTOKOPI_TALEP_ID"] = sValue;
        Response.Redirect("~/fotokopiTalebimiGor.aspx");
    }

}

```