In an ASP.NET environment, I am working with a string called ctl00_ContentPlaceHolder1_lstViewFormulas_ctrl06_lblCountDown, which will be passed into a JavaScript function using the sender parameter from my button control...
<asp:Button ID="buttStartTimer" runat="server" CausesValidation="false" OnClientClick="javascript:countdown(this);" Text="Start" />
Here is the JavaScript function:
function test(sender) {
}
I need to extract the number that directly follows "ctrl" in the string. For example, in the above scenario, the number would be 06 (ctrl06_lblCountDown)
Is there a way to achieve this extraction using JavaScript?
Thank you