Having an issue with the JavaScript function below that I am using to set active ASP.NET tabs. Whenever I run the code, it always returns CurrentTab as "null". Can anyone help me solve this problem?
function SetActiveTab2(tabNumber) {
try {
var CurrentTab = $find('<%#cust_tab.ClientID%>');
var CurrentTab = document.getElementById('<%=cust_tab.ClientID%>');
//The second line is giving me an error that says The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
CurrentTab.set_activeTabIndex(parseInt(tabNumber));
}
catch (e) {
alert('An error has occurred: ' + e.message)
return false;
}
}