Maybe something like this will help you:
<body onload="timer()">
<form id="form1" runat="server">
<div>
<asp:hiddenfield runat="server" id="timerValue" value="0" xmlns:asp="#unknown" />
<script type="text/javascript" language="javascript">
function timer() {
var timerValue = document.getElementById("timerValue");
var i = timerValue.value;
var digiformat = "";
if (i > 3599) {
var H = Math.floor(i / 3600);
} else {
var H = 0;
}
var M = i - (H * 3600)
if (M > 59) {
M = Math.floor(M / 60)
} else {
M = 0
}
var S = i - (M * 60)
if (H < 10) {
H = "0" + H;
}
if (M < 10) {
M = "0" + M;
}
if (S < 10) {
S = "0" + S;
}
document.getElementById('lblTimer').innerHTML = H + ":" + M + ":" + S;
setTimeout('timer()', 1000);
i++;
timerValue.value = i;
}
</script>
<label id="lblTimer" style="font-size:30px"></label>
<asp:button runat="server" text="Refresh" xmlns:asp="#unknown" />
</div>
</form>
</body>