Click here to Skip to main content
13,294,840 members (64,643 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I have large page contains three panels.In this panel one when clicking on some button the page is loading and goes to top.After using MaintainScrollPostionOnPostback property in page directive it works fine.

<%@ Page Language="C#" AutoEventWireup="true" Codebehind="WizardNewProposal.aspx.cs"
    Inherits="Frond.EditPages.WizardNewProposal" MaintainScrollPositionOnPostback="true"%>

But one issue on that.

When I am clicking previous button in panel one to go to panel zero,then the panel zero display at the half of the page at the time of loading.After scrolling and I go to top of the page.Then pressing next button in panel one the same issue occur in panel two.Please give the idea to solve.
Posted 8-Jan-13 3:57am
Updated 8-Jan-13 4:11am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

<script type="text/javascript">
    var xPos, yPos;
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    function BeginRequestHandler(sender, args) {
        xPos = $get('scrollDiv').scrollLeft;
        yPos = $get('scrollDiv').scrollTop;
    function EndRequestHandler(sender, args) {
        $get('scrollDiv').scrollLeft = xPos;
        $get('scrollDiv').scrollTop = yPos;

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.171207.1 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100