Skip to content

Instantly share code, notes, and snippets.

@PilotBob
Created December 1, 2011 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PilotBob/1420498 to your computer and use it in GitHub Desktop.
Save PilotBob/1420498 to your computer and use it in GitHub Desktop.
Razor parsing error
@if (Model.Property.AddressBookMain != null) {
@Html.Partial("_address", Model.Property.AddressBookMain)
}
@if (Model.Property.AddressBookMail != null) {
@Html.Partial("_address", Model.Property.AddressBookMail)
}
@if (Model.Property.AddressBookBill != null) {
@Html.Partial("_address", Model.Property.AddressBookBill)
}
@PilotBob
Copy link
Author

PilotBob commented Dec 1, 2011

I get a parsing error on this. I've tried several things and can't seem to get it right.

Parser Error Message: Unexpected "if" keyword after "@" character. Once inside code, you do not need to prefix constructs like "if" with "@".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment