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 3633006
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:35:52+00:00 2026-05-19T00:35:52+00:00

I have a potential maths / formula / algorithm question which I would like

  • 0

I have a potential maths / formula / algorithm question which I would like help on.

I’ve written a questionnaire application in ASP.Net that takes people through a series of pages. I’ve introduced conditional processing, or branching, so that some pages can be skipped dependent on an answer, e.g. if you’re over a certain age, you will skip the page that has Teen Music Choice and go straight to the Golden Oldies page.

I wish to display how far along the questionnaire someone is (as a percentage). Let’s say I have 10 pages to go through and my first answer takes me straight to page 9. Technically, I’m now 90% of the way through the questionnaire, but the user can think of themselves as being on page 2 of 3: the start page (with the branching question), page 9, then the end page (page 10).

How can I show that I’m on 66% and not 90% when I’m on page 9 of 10?

For further information, each Page can have a number of questions on that can have one or more conditions on them that will send the user to another page. By default, the next page will be the next one in the collection, but that can be over-ridden (e.g. entire sets of pages can be skipped).

Any thoughts? :-s

  • 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-19T00:35:53+00:00Added an answer on May 19, 2026 at 12:35 am

    Simple answer is you can’t. From what you have said you won’t know until you have reached the end how many pages the user is going to see so you can’t actually display an accurate result.

    What you could do to get a better result as in your example is to assume they are going through all the remaining pages. In this case you would on any page have:

    1. Number of pages gone through so far including current (visited_pages)
    2. Number of the current page (page_position)
    3. Total number of pages (total_pages)

    The maximum number of pages is now:

    max_pages = total_pages - page_position + visited_pages
    

    You can think of total_pages-page_position as being the number of pages left to visit which makes the max_pages quite intuitive.

    So in the 10 page example you gave visited_pages = 2 (page 1 and page 9), page_position = 9 and total_pages = 10.

    so max_pages = 10-9+2 = 3.

    then to work out the distance through you just do

    progress = visited_pages/max_pages*100
    

    One thing to note is that if you were to go to pages 1,2,3,4,9,10 then your progress would be 10%,20%,30%,40%,83%,100% so you would still get a strange jump that may confuse people. This is pretty much inevitable though.

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

Sidebar

Related Questions

We have a lot of open discussions with potential clients, and they ask frequently
I have a Dictionary<string,int> that has the potential to contain upwards of 10+ million
Some development skills, like refactoring operations, feel like they have an almost unlimited pontential
I have an application where I have potentially many processes must send a message
I have a (potentially dumb) question about the C++ STL. When I make a
I have a DataListItem which can potentially be a dropdownlist or a textbox. To
I have potentially large files that need to be sorted by 1-n keys. Some
I have an array of numbers that potentially have up to 8 decimal places
Problem: a table of coordinate lat/lngs. Two rows can potentially have the same coordinate.
I have an objectdatasource that will return a potentially large collection (up to 200,000

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.