FAQ: Razor Pages Syntax I - Working with Loops

This community-built FAQ covers the “Working with Loops” exercise from the lesson “Razor Pages Syntax I”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Build Web Apps with ASP.NET

FAQs on the exercise Working with Loops

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!
You can also find further discussion and get answers to your questions over in #get-help.

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head to #get-help and #community:tips-and-resources. If you are wanting feedback or inspiration for a project, check out #project.

Looking for motivation to keep learning? Join our wider discussions in #community

Learn more about how to use this guide.

Found a bug? Report it online, or post in #community:Codecademy-Bug-Reporting

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

My problems with this exercise are twofold:

  1. This exercise has what I believe to be a bug in it. The second task is either unclear, or the verification is incorrectly marking solutions as invalid. The task asks that I add a pair of unordered list tags under the <h5> heading (which is, in actuality an <h4> tag, but a minor typo isn’t why I’m here). When I add the unordered list tags and click run to move to the next task, the task comes up with a failure and asks if I put the <ul></ul> tags in. I have tried multiple combinations of solutions and have yet to find a way to make it work. In the end I asked for the solution, copied it, reset the exercise, and pasted the exact code. The second task still fails.

  2. Even when I ask for the solution for the exercise, the results are not correctly rendered in the webpage view sidebar.

Not sure what to do aside from take the solution and move on, but the completionist in me hates to do it.

I’m having the exact same problem. I’ve actually been having this issue with the entire ASP.NET course, what I think is happening is the test that controls progression through the lesson is very strict and is looking for an exact character match since there doesn’t seem to be a good way to assess the results. I’ve found multiple situations where the code works just fine, it’s doing what the lesson wants it to do, and it still won’t recognize it. I’ve had some very nitpicky issues like having a space between a for and the parentheses, or not having a space between the closing parentheses and the opening bracket. Unfortunately I just don’t think that this platform is the best for learning ASP.NET, although I’ve been pretty satisfied with the base C#, Python, and computer science modules.

I just caught the problem I was having on the last evaluation. I had one code block for the entire while loop structure, but the solution expected two different code blocks. Give me a break.