Hello everyone and thanks for your help in advance. I'm trying to create and if then condition inside of a for each loop but am receiving an error } expected. The code looks like this:
I actually have two problems. First, the error message and second, how do I display the variable CustomerName within the rendered HTML. Any help would be appreciated.
Member
276 Points
1548 Posts
Using If Then Nested in For Each in Razor
Jan 13, 2018 09:43 PM|kmcnet|LINK
Hello everyone and thanks for your help in advance. I'm trying to create and if then condition inside of a for each loop but am receiving an error } expected. The code looks like this:
I actually have two problems. First, the error message and second, how do I display the variable CustomerName within the rendered HTML. Any help would be appreciated.
All-Star
48694 Points
11075 Posts
Re: Using If Then Nested in For Each in Razor
Jan 13, 2018 11:43 PM|bruce (sqlwork.com)|LINK
Member
276 Points
1548 Posts
Re: Using If Then Nested in For Each in Razor
Jan 13, 2018 11:52 PM|kmcnet|LINK
Thanks for the response. However, This puts me back at the } expected error.
All-Star
48694 Points
11075 Posts
Re: Using If Then Nested in For Each in Razor
Jan 14, 2018 10:08 PM|bruce (sqlwork.com)|LINK
did you take out all those erroneous @'s?
Member
276 Points
1548 Posts
Re: Using If Then Nested in For Each in Razor
Jan 15, 2018 03:29 AM|kmcnet|LINK
Thank you. I had erroneously left one. That fixed it. Thanks for the help.