My XML name in Schema is ref which is a Text field in the Metadata. When I am trying to display this field as


it throws an error:

identifier expected, ref is a keyword

as I am trying to use a keyword - ref

I have tried different options, such as:

<text> @Component.Metadata.ref </text>
@: @Component.Metadata.ref

But still get the same error for each of them.

I tried using one more @ as in C# we use to skip the keyword name:


But razor then says:

Argument missing

And with


Razor displays @ref instead of ref value

Could someone please suggest how I can display its value?

The Razor version is 1.2.

  • What type of field is ref in the Schema? Dec 12, 2013 at 8:56
  • "ref" is a text field in the Metadata.
    – Meenakshi
    Dec 12, 2013 at 9:01

2 Answers 2


Have you tried:


I haven't tested it but I think this would work


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.