- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
到目前为止,发生错误的原因可能是当页面索引更改时,由于模式中 gridview 的 databin-6ren">
引导模式是使用远程生成的
<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>
到目前为止,发生错误的原因可能是当页面索引更改时,由于模式中 gridview 的 databind() 导致 __viewstate
发生更改,如果我将 gridview 从 Bootstrap 移动到新页面,则 gridview分页工作正常,如果在boostrap模式中,第一次点击任何分页后,第二次点击分页会遇到错误,有什么替代方法吗?
部分错误
System.Web.HttpException (0x80004005):此页面的状态信息无效,并且可能已损坏。 ---> System.Web.UI.ViewStateException:无效的 View 状态。
代码隐藏
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
引导表单的一部分
<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>
到目前为止的引用
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)
最佳答案
只是猜测,
所以你提到模式是使用远程生成的
,这可能是你的 View 状态无效的原因。尝试在页面和模态上查看源代码
,看看它们是否都生成了 View 状态。
看起来像这样
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="SOMESTUFFHERE" />
如果您确实有两个 View 状态,请尝试使用 JavaScript 删除模式弹出窗口上的 View 状态,如果这不起作用,请尝试从服务器响应(生成模式的响应)中删除 View 状态
关于jquery - gridview页面索引更改错误: The state information is invalid for this page and might be corrupted(alternative solution needed),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25762770/
我是一名优秀的程序员,十分优秀!