Which would display the video fine, but I am now trying to do this in
razor and I can't seem to get it to display at all? Should I use html raw? I tried but couldnt get it working
This is basically what I have at the moment which just spits out the iframe url
Hey guys, I'm seeing the exact same issue but @Html.Raw(...) isn't working. Essentially I have a multiple textfield set up, which stores an iframe value for an embedded youtube video. If I add any iframe code into this textfield, the value stored in it gets ignored and nothing gets displayed at all, whereas if I enter a normal text value into the textfield, this gets output when I call the property.
I would have thought @html.raw would fix it but it isn't working.
I'm working with v 6.0.3.
Any help would be massively appreciated!
Edit: just to test, I added some text in between iframe tags, e,g, <iframe src='...'>test</iframe> and the text "test" renders fine while the iframe tags get stripped.
Displaying iframe with razor
Im having a bit of trouble displaying an iframe using razor
I have set this up so that in umbraco I paste the iframe link into a multiple textfield, and if I was doing this in an XSLT I would do something like:
Which would display the video fine, but I am now trying to do this in razor and I can't seem to get it to display at all? Should I use html raw? I tried but couldnt get it working
This is basically what I have at the moment which just spits out the iframe url
Anyone have any ideas please?
Cheers
Try this:
Brilliant thank you!
Hey guys, I'm seeing the exact same issue but @Html.Raw(...) isn't working. Essentially I have a multiple textfield set up, which stores an iframe value for an embedded youtube video. If I add any iframe code into this textfield, the value stored in it gets ignored and nothing gets displayed at all, whereas if I enter a normal text value into the textfield, this gets output when I call the property.
I would have thought @html.raw would fix it but it isn't working.
I'm working with v 6.0.3.
Any help would be massively appreciated!
Edit: just to test, I added some text in between iframe tags, e,g, <iframe src='...'>test</iframe> and the text "test" renders fine while the iframe tags get stripped.
is working on a reply...