bumble_bee_tuna
bumble_bee_tuna

Reputation: 3563

ASP.NET Maintain Scroll position o Post Back in Ever Updating Firefox Chrome

MSDN Article

Maintaining scroll position works in IE and used to work in Firefox (before we jumped from 3.6 to 9.something). Has anyone had any success getting this to work in Firefox or Chrome ??

Upvotes: 2

Views: 2789

Answers (2)

Ashfaq Shaikh
Ashfaq Shaikh

Reputation: 1668

you can use this javascript. You have to put hiddenfield where you want to set scroll after postback.

<script type="text/javascript" language="javascript">
    var scroll = {
        Y: '#<%= hfScrollPosition.ClientID %>'
    };

    $(document).ready(function () {
        $("#scrollable-container").scrollTop($(scroll.Y).val());
    });
</script>

Upvotes: 1

Related Questions