I have been trying to implement div refresh in Microsoft Webmatrix environment. I'm preparing cshtml webpage. I use following code:
@{
}
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(function(){
setInterval("my_function();",1000);
function my_function(){
$("#refresh").load(location.href + '#time');
}
</script>
</head>
<body>
<div id="refresh">
<div id="time"> Today is @DateTime.Now </div>
</div>
</body>
unfortunately it does not works. it do not refresh the actual time in 'time' div. where is my mistake in the code? Best regards Artur;