Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET
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 2:57am
Edited 8-Jan-13 3: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
0 OriginalGriff 370
1 Sergey Alexandrovich Kryukov 205
2 Prakriti Goyal 177
3 jlopez788 134
4 _Amy 110
0 OriginalGriff 6,762
1 Sergey Alexandrovich Kryukov 5,539
2 Maciej Los 3,479
3 Peter Leow 3,323
4 DamithSL 2,505

Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2014
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