It's can be really hard with razor to determine whether a line is html or content or code, but if you start writing some html, then usually you need to start a code block again
@{}
to let the parser know you want to do a bit of code
so I think what was happening here is your var newsImage line was not being intepreted as code, whereas if you move that to the first line after the foreach, before you have written out any html, then it should be!
cant render image inside of html?
Hi
I'm trying to add a media picker to my html template but for some reason it doesnt like it inside the divs?
Here is my code;
Which displays the following error;
However if I add my mediapicker code just before the closing } it displays, but not where I want the code.
What am I doing wrong?
Thanks
Matt
Hi Matt
It's can be really hard with razor to determine whether a line is html or content or code, but if you start writing some html, then usually you need to start a code block again
@{} to let the parser know you want to do a bit of code
so I think what was happening here is your var newsImage line was not being intepreted as code, whereas if you move that to the first line after the foreach, before you have written out any html, then it should be!
Thanks Marc, that did the trick! appreciate the fast response.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.