For the sake of clarity, I am providing this response based on Jamieson's answer. The final outcome involved incorporating the following Javascript code:
<script type = "text/javascript">
/* Stop, Clear and Pause the timer displayed under the pause buttons */
var h1 = document.getElementsByTagName('h1')[0],
start = document.getElementById('start'),
stop = document.getElementById('stop'),
clear = document.getElementById('clear'),
seconds = 0, minutes = 0, hours = 0,
t;
function add() {
seconds++;
if (seconds >= 60) {
seconds = 0;
minutes++;
if (minutes >= 60) {
minutes = 0;
hours++;
}
}
document.getElementById('<%=h1.ClientID%>').innerText = (hours ? (hours > 9 ? hours : "0" + hours) : "00") + ":" + (minutes ? (minutes > 9 ? minutes : "0" + minutes) : "00") + ":" + (seconds > 9 ? seconds : "0" + seconds);;
timer();
}
function timer() {
t = setTimeout(add, 1000);
}
function stp() {
clearTimeout(t);
}
function clr() {
document.getElementById('<%=h1.ClientID%>').innerText = "00:00:00";
seconds = 0; minutes = 0; hours = 0;
}
</script>
To incorporate the ASP.Net component, you will need to include the following:
<asp:UpdatePanel ID="UpdatePanel4" runat="server">
<ContentTemplate>
<table style="width:132px; margin-left:13px">
<tr>
<td style="text-align:center; margin-left:2px; border:double; background-color:darkcyan">
<asp:Label ID="h1" runat="server" ForeColor="White"><time>00:00:00</time></asp:Label>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
Subsequently, for the ASP buttons, the following was added:
onclientclick="stp();"
If there is already an onclientclick attribute on your button, simply separate them with a semicolon as multiple functions can be called simultaneously.
In addition, certain sections in the code-behind required the following additions:
ScriptManager.RegisterClientScriptBlock(UpdatePanel4, this.GetType(), "script", "stp()", true);
ScriptManager.RegisterClientScriptBlock(UpdatePanel4, this.GetType(), "script", "clr()", true);
Please note that the necessity of the last piece may vary depending on the context of your implementation.