帮助解决页面跳转 [英] Help for solve the page jumping

查看:66
本文介绍了帮助解决页面跳转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想运行我的网页并在页面中选择要从更新面板中获取数据的页面中的项目时遇到问题,页面跳到页面的第一页.

不好,您能告诉我如何解决网页跳页问题吗?

感谢

Hi
I have a problem when I want run my web page and select item in page that get data from in update panel, the page jump at the first of page.

It''s not good, can you tell me how can I solve page jumping in my web?

Thanks

推荐答案

您可以使用以下解决方案来解决此问题:-

1.通过将Page的MaintenanceScrollPositionOnPostBack属性设置为true.
You can solve this problem by using these solutions:-

1.By Setting the MaintainScrollPositionOnPostBack property of Page to true.
Page.MaintainScrollPositionOnPostBack = true;



2.通过使用Page的SetFocus方法.



2.By Using SetFocus method of Page.

Page.SetFocus(your_controlID);
//this method needs to provide your Control's Id which you want to focus.



3.通过JavaScript函数.



3.By JavaScript function.

window.scrollTo = function (x, y) {
         return true;
     }



希望对您有帮助.
祝您好运.



I hope it will help you.
Best of luck.


正如Rajesh所说的,保持滚动位置.
在页面指令中设置MaintainScrollPositionOnPostback="true".
试试这个:
As Rajesh told maintain the scroll position.
Set the MaintainScrollPositionOnPostback="true" in your page directive.
Try this:
<%@ Page Title="" Language="C#" Trace="false" MasterPageFile="~/Main.master" MaintainScrollPositionOnPostback="true" AutoEventWireup="true" CodeFile="eUW_Fire_RegisterQuote.aspx.cs" Inherits="Fire_RegisterQuote" %>



--Amit



--Amit


这篇关于帮助解决页面跳转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆