Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 295557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:28:07+00:00 2026-05-12T06:28:07+00:00

I have a div as such: <div style=overflow-y: scroll; height: 260px> I contains a

  • 0

I have a div as such:

<div style="overflow-y: scroll; height: 260px">

I contains a few hundred records and allows me to select an item to populate a formview control below it.

The problem is that when the page posts-back, the scroller position goes back to the top of the div. I want to try and maintain its position so that the selected record is still visible.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:28:07+00:00Added an answer on May 12, 2026 at 6:28 am

    Place something like:

     <asp:HiddenField id="hdnScrollPos" runat="server"/> in your aspx.
    

    Then, some javascript like:

    var hdnScroll = document.getElementById(<%=hdnScrollPos.ClientID%>);
    var bigDiv = document.getElementById('bigDiv');
    bigDiv.onscroll = function() {
         hdnScroll.value = bigDiv.scrollTop;
    }
    
    window.onload = function () { 
        bigDiv.scrollTop = hdnScroll.value;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So currently I have: #div { position: relative; height: 510px; overflow-y: scroll; } However
I have such div: <div class=box> <div id=myid style=display:hidden;> <p>some stuff here</p></div> </div> when
I have the following code snippet: <div id=listbox1div style=z-index:95; background:white; overflow-y:auto; overflow-x:hidden; width:240; height:314px;>
So I have 3 divs contained inside a containing div like such: <div id=contain>
assume I have a such html order <div id=header>>Header(logo, navigation menus etc)will be here,
so I have my main layout as such: <div class=menu> <?php include('/menu.php'); ?> </div>
I have thumbnails on a page, as such: <div id=credits> <a href=largeimage1.jpg alt=credits1.php><img src=thumb1></a>
It seems that in Firefox, if I have div A with fixed width/height and
I have a webpage with a div which contains several other divs WITHOUT an
If I have a style class defined as such: .myclass{ //bunch of other stuff

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.