错误的网格视图选择

wrong Grid view selection

我有一个包含 3 个网格视图的页面

第一个:

<cc1:Grid ID="Grid2" runat="server" FolderStyle="~/Styles/grand_gray" DataSourceID="SqlDataSource2" AutoPostBackOnSelect="true"
       AutoGenerateColumns="true" AllowAddingRecords="false" AllowColumnResizing="true" AllowPageSizeSelection="true" Width="100%" OnSelect="Grid2_Select">
        <Columns>
            <cc1:Column DataField="date" HeaderText="Date" HeaderAlign="left" Align="left" ></cc1:Column>
            <cc1:Column DataField="description" HeaderText="Description" HeaderAlign="left" Align="left" ></cc1:Column>
            <cc1:Column DataField="partici" HeaderText="partici" HeaderAlign="left" Align="left" ></cc1:Column>
            <cc1:Column DataField="publicationName" HeaderText="publication Name" HeaderAlign="left" Align="left" ></cc1:Column>
        </Columns>
        <ScrollingSettings ScrollWidth="100%" />
    </cc1:Grid>

第二个:

<cc1:Grid ID="Grid3" runat="server" FolderStyle="~/Styles/grand_gray" DataSourceID="SqlDataSource3" AutoPostBackOnSelect="true"
       AutoGenerateColumns="true" AllowAddingRecords="false" AllowColumnResizing="true" AllowPageSizeSelection="true" Width="100%" OnSelect="Grid3_Select">
        <Columns>
            <cc1:Column DataField="date" HeaderText="Date" HeaderAlign="left" Align="left" ></cc1:Column>
            <cc1:Column DataField="description" HeaderText="Description" HeaderAlign="left" Align="left" ></cc1:Column>
            <cc1:Column DataField="partici" HeaderText="partici" HeaderAlign="left" Align="left" ></cc1:Column>
            <cc1:Column DataField="publicationName" HeaderText="publication Name" HeaderAlign="left" Align="left" ></cc1:Column>
        </Columns>
        <ScrollingSettings ScrollWidth="100%" />
    </cc1:Grid>

第三个

<cc1:Grid ID="Grid1" runat="server" FolderStyle="~/Styles/grand_gray" DataSourceID="SqlDataSource1" AutoPostBackOnSelect="true"
       AutoGenerateColumns="true" AllowAddingRecords="false" AllowColumnResizing="true" AllowPageSizeSelection="true" Width="100%" OnSelect="Grid1_Select">
        <Columns>
            <cc1:Column DataField="date" HeaderText="Date" HeaderAlign="left" Align="left" ></cc1:Column>
            <cc1:Column DataField="description" HeaderText="Description" HeaderAlign="left" Align="left" ></cc1:Column>
            <cc1:Column DataField="partici" HeaderText="partici" HeaderAlign="left" Align="left" ></cc1:Column>
            <cc1:Column DataField="publicationName" HeaderText="publication Name" HeaderAlign="left" Align="left" ></cc1:Column>
        </Columns>
        <ScrollingSettings ScrollWidth="100%" />
    </cc1:Grid>

并且当用户 select 从后面的代码中他们中的任何一个的任何行他转到另一个页面取决于他们每个人的数据 问题是:如果 select 第一个代码运行良好 然后我使用浏览器的后退按钮和第二个或第三个网格的 select 行 selected 行仍然是第一个网格

protected void Grid1_Select(object sender, Obout.Grid.GridRecordEventArgs e)
    {
        foreach (Hashtable h in e.RecordsCollection)
        {
            string date = h["date"].ToString();
            string description = h["description"].ToString();
            string partici = h["partici"].ToString();
            string publicationName = h["publicationName"].ToString();
            Session["date"] = date;
            Session["description"] = description;
            Session["partici"] = partici;
            Session["publicationName"] = publicationName;

            Response.Redirect("Publications_View.aspx");
        }
    }

protected void Grid2_Select(object sender, Obout.Grid.GridRecordEventArgs e)
    {
        foreach (Hashtable h in e.RecordsCollection)
        {
            string date = h["date"].ToString();
            string description = h["description"].ToString();
            string partici = h["partici"].ToString();
            string publicationName = h["publicationName"].ToString();
            Session["date"] = date;
            Session["description"] = description;
            Session["partici"] = partici;
            Session["publicationName"] = publicationName;

            Response.Redirect("Publications_View.aspx");
        }
    }

protected void Grid3_Select(object sender, Obout.Grid.GridRecordEventArgs e)
    {
        foreach (Hashtable h in e.RecordsCollection)
        {
            string date = h["date"].ToString();
            string description = h["description"].ToString();
            string partici = h["partici"].ToString();
            string publicationName = h["publicationName"].ToString();
            Session["date"] = date;
            Session["description"] = description;
            Session["partici"] = partici;
            Session["publicationName"] = publicationName;

            Response.Redirect("Publications_View.aspx");
        }
    }

注意:如果我第一次 select 第二个或第三个网格代码运行良好,直到第一个网格的第 i select 行,然后问题再次发生并且只有从第一个网格出现在哪个网格 i select

有什么帮助吗??

我通过添加一个 return 我返回原始页面的按钮解决了这个问题 然后如果我选择第二个或第三个网格它绑定得很好

这并没有真正解决问题,但我不得不绕过它

所以我认为问题出在浏览器的后退按钮(页面现金或类似的东西)