【问题标题】:Maintain scroll position when using Response.Redirect(Request.RawUrl)使用 Response.Redirect(Request.RawUrl) 时保持滚动位置
【发布时间】:2015-07-01 20:16:42
【问题描述】:

我想在使用时保持滚动位置:

Response.Redirect(Request.RawUrl)

这是因为我的 GridView 中有一个按钮,用于更新 Grid 中的值。单击按钮后,我想更新 Gridview 中的值,这需要Response.Redirect(Request.RawUrl),但我也想保持滚动位置。

这也不起作用:

maintainScrollPositionOnPostback="true" 

我尝试了其他 Javacript 方法,但它们都不能正常工作,因为我正在刷新页面。

我该怎么做?

【问题讨论】:

标签: javascript jquery asp.net vb.net gridview


【解决方案1】:

我修好了。

我用GridView1.DataBind()替换了Response.Redirect(Request.RawUrl)

【讨论】:

    猜你喜欢
    • 2012-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多