At the moment, I find myself in a peculiar situation where I need to combine JavaScript with server-side code. Here's how it looks:
function PerformGlobalCallback(sender, value) {
var index = hfCurrentTabIndex.Get("activeIndex"));
window['<%= ((ASPxCallbackPanel)myTabControl.TabPages[index].Controls[0]).ClientInstanceName %>'].PerformCallback(sender + "|" + value);
}
In this code, hfCurrentTabIndex is a hidden field that stores the current tab index correctly. Unfortunately, I can't simply use the "index" variable within the <%= %> section, so I need to find a workaround.
The reason behind this requirement is that the current tab index of myTabControl gets lost during callbacks. Despite storing it in Session, I encounter null values when trying to access it in the code above.
If you have any insights or suggestions on how to address this issue, I would greatly appreciate your help.