Search code examples
asp.net-mvc-3videosyntaxrazorcamtasia

MVC3 Razor Camtasia Video Embedding, @ param Error :-(


Greetings Community!

            <object id="myExperienceXXXXXXXX" class="BrightcoveExperience">
              <param name="bgcolor" value="#FFFFFF" />
              <param name="width" value="448" />
              <param name="height" value="251" />
              <param name="playerID" value="XXXXXXXXXX" />
              <param name="playerKey" value="XXXXXXXXXXX" />
              <param name="isVid" value="true" />
              <param name="dynamicStreaming" value="true" />
              <param name="@videoPlayer" value="XXXXXXXXXXXXX" />
            </object>

Notice the last line , I get the following error:

Compiler Error Message: CS0103: The name 'videoPlayer' does not exist in the current context

This value is Required by Camtasia to embed my video in my page. I'm sure there is a simple solution, but I need the "@" sign before the videoPlayer value.

Thanks in advance for any assistance.


Solution

  • @ is a reserved character in Razor which should normally be followed by a server side expression. Double it if you want to output it literally:

    <param name="@@videoPlayer" value="XXXXXXXXXXXXX" />