I want to load a HTML file in an Iframe dynamically.
I tried the following code:
<script type="text/javascript">
$(document).ready(function () {
$('a').click(function (e) {
e.preventDefault();
filename = "\"+$(this).text() + ".htm";
alert(filename);
$('iframe').attr('src', filename);
});
}); </script>
Directory Structure: E:SVN_HobbyHomes\HobbyHomesWebApp\HTML\Dancing.htm
It doesn't load the file in the path inside the Iframe. Howevr if i write like this it works but i don know how to use @Url.Content in javascript
<iframe id="iframe" frameborder="0" src=src="@Url.Content("~/HTML/Dancing.htm")" style="width: 100%; height: 700px;"></iframe>
Stil it gives me error:Resource Could notbe Found!!!