Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
412
Programmatcially selecting a tab in Code Behind
posted

I know this isn't available in the form UltraWebTab1.Tabs(0).Selected = True but thats what I'm trying to get to.  Depending on what an end-user selects I want a certain tab to show up.  I previously read a post on how to use the client side events to do this, something like below...

function gotoGSMtab()
{
var ultraTab = igtab_getTabById('<%=wtService.ClientID %>');
ultraTab.setSelectedIndex(0);
return false;
}

 

I would like to call this from a SelectedIndexChanged of a regular drop down in the code behind, something like this...

        Dim sbc As String = ""

        Select Case tab
            Case "a"
                wtService.Tabs(0).Visible = True
                sbc = "<script type='text/javascript'>"
                sbc = sbc + "var ultraTab = igtab_getTabById('<%=wtService.ClientID %>');"
                sbc = sbc + "ultraTab.setSelectedIndex(0);"
                sbc = sbc + ("</script>")
            Case "b"
                wtService.Tabs(1).Visible = True
                sbc = "<script type='text/javascript'>"
                sbc = sbc + "var ultraTab = igtab_getTabById('<%=wtService.ClientID %>');"
                sbc = sbc + "ultraTab.setSelectedIndex(1);"
                sbc = sbc + ("</script>")
        End Select
        ClientScript.RegisterStartupScript(Me.GetType(), "RM", sbc)

Parents Reply Children
No Data