Selected tab to Session without autopostback

1 posts, 0 answers
  1. David
    David avatar
    77 posts
    Member since:
    Apr 2008

    Posted 31 Jul 2009 Link to this post

    Hello

    I have a tabstrip on a page.  On a few applications I need to do a complete postback to upload files or reload data.

    I want to remember the tab they were on and reload that page.

     

    I have the following code working in page load

     

            If Not Page.IsPostBack Then  
                Dim TheTab As String = "" 
                TheTab = Session("Tab")  
     
                If TheTab <> "" Then  
     
                    Try  
                        ' Set Tabstrip  
                        RadTabStrip1.FindTabByText(Session("Tab")).Selected = True 
                        'Set MultiPagePage  
                        RadMultiPage1.FindPageViewByID(RadTabStrip1.SelectedTab.PageViewID).Selected = True 
                        Session("Tab") = ""  
                    Catch  
                        ' OK if it fails  
                    End Try  
                End If  
            End If  
     
            'Reset Tab Session  
            Utilities.SetSession("Tab", RadTabStrip1.SelectedTab.Text) 

    However i have to set the tabstrip to autopostback to get this. The tabs perform WAY ! better clicking between them w/o it and there is absolutely no need to do a postback on just clicking between pages.

    I am bad at Javascript - probably why i write in VB  Is there an easy conversion of this method on the client side ?
    Or an example i am not finding ?




Back to Top