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

  • Home
  • SEARCH
  • 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 7779045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:33:05+00:00 2026-06-01T18:33:05+00:00

I am working with adding up user’s scores based on their checks in a

  • 0

I am working with adding up user’s scores based on their checks in a CheckBoxList. Every time a user checks a box, a value, X, is added to the overall score. When a user unchecks a box, a value, X, is subtracted from the overall score. No problems here.

The problem that I am having is that using the AutoPostback option in the CheckBoxList properties forces the page to load back to the top instead of staying where the user was situated, which means that they have to keep scrolling down after each check/uncheck. Is there a way to prevent this?

  • 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-06-01T18:33:06+00:00Added an answer on June 1, 2026 at 6:33 pm

    Ajax solution

    Of course, the best way is to use an Ajax call on that. The page is not moved at all, and the data is just updated. The updatepanel is a fast and easy solution for starting – not an optimal solution, but if you have a simple page, it is a very good one.

    Second solution

    A second solution is to use anchor #. You set the point on which you like it to show up:

    <a name="PointA"></a>
    

    And you call the page using that anchor as page.aspx#PointA.

    Third solution

    A third solution is to use the inside JavaScript code of ASP.NET. On the page declaration (top first line) <%@ Page MaintainScrollPositionOnPostback="true" %>.

    Or on the web.config to affect all pages, <pages maintainScrollPositionOnPostBack="true" />.

    Or programmatically System.Web.UI.Page.MaintainScrollPositionOnPostBack = true; to open it and close it by demand.

    Using jQuery

    With only two lines of jQuery code you can make a nice animation on the point you like to move after the post back:

    var WhereToMove = jQuery("#PointA").position().top;
    jQuery("html,body").animate({scrollTop: WhereToMove }, 1000);
    

    And you move the page to this element:

    <a id="PointA" name="PointA"></a>
    

    Google search

    And finally, you can use custom JavaScript code to do the same. There are many samples on the Internet for this: https://www.google.com/?q=asp.net+remain+position

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on a site that displays user information on every page.
Working with express.js for the first time, and I am stuck on adding my
I'm working on adding user submitted comments to a personal project. Comments have a
I working on adding file uploading to my web application. I'm using an iframe
I'm working on adding globalization to my product cataloge and I have made it
I am working on adding in a settings bundle for my application as a
I am working on adding In-App purchases to my app. I am able to
I am working on adding a custom accessory view, (a button) to a UITableViewCell,
Context: I'm working on master adding a simple feature. After a few minutes I
The code I'm currently working on requires adding an NSNumber object to an array.

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.