How to use the Url.Action
method in the iframe
src
attribute. Like
<iframe src = '<%=Url.Action("HelloWorld", "myController");%>' width = "100%" height="1000" frameBorder="0"></iframe>
But its not working properly. Its saying that the requested content is not available.
Please help me
Using ASP.NET engine
<iframe src = '<%: Url.Action("HelloWorld", "myController") %>' width = "100%"
height="1000" frameBorder="0"></iframe>
Using razor engine.
<iframe src = '@Url.Action("HelloWorld", "myController")' width = "100%"
height="1000" frameBorder="0"></iframe>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With