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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:16:29+00:00 2026-05-20T16:16:29+00:00

having some trouble with my razor syntax gives a Parsor error saying that The

  • 0

having some trouble with my razor syntax

gives a Parsor error saying that
The foreach block is missing a closing “}” character

<ul>
@{var client = "null";}
@foreach (var instance in Model)
{
   if (instance.tbl_Policy.tbl_Client.txt_clientName != client)
   {
       client = instance.tbl_Policy.tbl_Client.txt_clientName;
      </ul><h1>@client</h1>   
      <ul>
   }
   <li>
    @instance.tbl_Policy.txt_policyNumber - 
    Assigned to : @instance.aspnet_Membership.aspnet_User.UserName
    @instance.ATLCheckType.Question
   <button type="button" rel="<%:instance.ATLCheckInstanceId.ToString()%>">DelFiled</button>
   <button type="button" rel="<%:instance.ATLCheckInstanceId.ToString()%>">DelLineItem</button>
   </li>  
}
</ul>
  • 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-20T16:16:30+00:00Added an answer on May 20, 2026 at 4:16 pm

    Razor cannot handle imbalanced HTML tags in code blocks.

    Change your if block to treat the imbalanced tags as plain text:

       if (instance.tbl_Policy.tbl_Client.txt_clientName != client)
       {
           client = instance.tbl_Policy.tbl_Client.txt_clientName;
          @:</ul><h1>@client</h1>   
          @:<ul>
       }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I am having some trouble accessing my model errors within my Razor view.
I´m having some trouble retrieving a collection of strings in a projection: say that
I'm having trouble figuring out Razor syntax and how variable scope works. I'm new
having some trouble passing a function as a parameter of another function... ERROR: Error
having some trouble with a Thread (CanvasThread) that is intermittently pausing at random points
Im having some trouble reading xml files using jquery that containts swedish chars (åäö)
So having some trouble with a class methods. I'll post all the information that
Im having some trouble with my syntax creating a select list for days in
Having some trouble with R's garbage collection, when passing objects to C++. We have
Having some trouble getting a screenscraper webservice up and running on a weblogic 10.3.3

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.