bootstrap modal is generate using remote
<a data-toggle="modal" data-target="#modal-panel" href="AdminUserMaintenance.aspx?id=<%# Eval("ProviderUserKey")%>" title="Edit" class="button-icons"><span class="glyphicon glyphicon-pencil"></span></a>
so far possible that the error occur because the __viewstate
is change due to databind() from gridview in modal when pageindex is change, if I move the gridview from bootstrap to a new page, the gridview paging work properly, if inside boostrap modal, after the first click of any paging, the second click of the paging will hit the error, any alternative way to make it?
part of the error
System.Web.HttpException (0x80004005): The state information is invalid for this page and might be corrupted. ---> System.Web.UI.ViewStateException: Invalid viewstate.
Code Behind
Protected Sub gvAdminUser_PageIndexChanging(sender As Object, e As GridViewPageEventArgs)
gvAdminUser.PageIndex = e.NewPageIndex
bindDataGrid()
End Sub
Private Sub bindDataGrid()
gvAdminUser.PageSize = _iMaximumRows
Dim oUser As MembershipUser = Membership.GetUser(UserID)
gvAdminUser.DataSource = Roles.GetAllRoles
gvAdminUser.DataBind()
End Sub
Part of bootstrap Form
<asp:UpdatePanel ID="pnlUpdate" runat="server">
<ContentTemplate>
<asp:GridView ID="gvAdminUser" runat="server" AutoGenerateColumns="false"
AllowPaging="true" EmptyDataText="No Data Found" BorderStyle="None"OnPageIndexChanging="gvAdminUser_PageIndexChanging">
<PagerSettings Mode="Numeric" Position="TopAndBottom" />
<Columns>
<asp:TemplateField HeaderText="Role" HeaderStyle-Width="40%" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label runat="server" ID="RoleNameLabel" Text='<%# Container.DataItem %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
Reference so far
ASP.NET Error:The state information is invalid for this page and might be corrupted
The state information is invalid for this page and might be corrupted. (Only in IE)