Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I'm really struggling with this as I have yet to find a VB solution anywhere. In the gridview is a hyperlink to another page. Once you follow that hyperlink and then click back on the browser, I get browser error: Confirm Form Resubmission

I think I'm close here, but it still doesn't work..

What I have tried:

<pre>
    <asp:GridView ID="gdvLondon" width="100%" runat="server" AllowPaging="True" OnPageIndexChanging="GridViewIndexChangingLondon"  AutoGenerateColumns="False" CssClass="mGrid" DataKeyNames="accountID" DataSourceID="DSLeaderboardLondon" PageSize="10" AllowSorting="True">
        '''' MY CODE
    </asp:GridView>

    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        If ispostback = false then
            If Session("pageNumber") isnot nothing Then
                gdvLondon.PageIndex = Convert.ToInt32(Session("pageNumber"))
            End If
        End If
    End Sub

    Protected Sub GridViewIndexChangingLondon(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs)
        gdvLondon.PageIndex = e.NewPageIndex
        Session("pageNumber") = e.NewPageIndex
    End Sub
Posted
Comments
20212a 19-Feb-21 11:14am    
That is just a warning from the browser that the page you are going back to is a page that posts and so the system will post it again. In your case I don't think that it matters if it posts again since it's just changing pages.

I don't think you can do anything about that message from the browser.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900