我正在使用下面的javascript函数来设置活动的asp.net选项卡。流水代码始终返回CurrentTab为“null”。任何人都可以帮助我解决我的问题。使用javascript设置tabcontainer活动选项卡
function SetActiveTab2(tabNumber) {
try {
var CurrentTab = $find('<%#cust_tab.ClientID%>');
var CurrentTab = document.getElementById('<%=cust_tab.ClientID%>');
//Second line return the error 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;
}
}
是在页面的页眉/你打电话就可以了'DataBind'方法这个代码? – 2013-05-11 14:01:25