CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2006
    Posts
    11

    Ajax Control Toolkit Tab Panel

    Hello,

    Can anyone please help me with Ajax Control toolkit codeing?
    Basically I have 5 tabs.

    I have created all the tabs but when the use first logs in they should be able to see only the first tab. The first tab will have a text field and a button so when the user enters data in the textbox and hits the button other tabs should be shown to user. Basically hiding and unhiding the tabs.

    I hope I could explain my query well

  2. #2
    Join Date
    Oct 2006
    Posts
    181

    Re: Ajax Control Toolkit Tab Panel

    I think I understand what you want. However, it's not clear what isn't working. The word 'but' seems to indicate it isn't showing the first tab when the user logs in. Try setting ActiveTabIndex to 0.

  3. #3
    Join Date
    Oct 2006
    Posts
    11

    Re: Ajax Control Toolkit Tab Panel

    Scott, Thank you for the reply, I did try setting active index to 0, I am not sure if I did the right thing. Do I have to set activeindex to 0 on all the tabs or make activeindex sequential like activeindex=0 for first tab, activeindex=1 for 2nd etc..??

  4. #4
    Join Date
    Oct 2006
    Posts
    181

    Re: Ajax Control Toolkit Tab Panel

    Oh, sorry. I didn't notice you replied.

    I'm not sure if I understand what you want to do. If I do understand correctly, then I'd have to suggest using other controls unless you really want a single visible tab. Anyway, I think the following code will do want you want.

    Code:
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    
            TabPanel1.Visible = True
            TabPanel2.Visible = False
            TabPanel3.Visible = False
            TabPanel4.Visible = False
            TabPanel5.Visible = False
    
            TabContainer1.ActiveTabIndex = 0
    
        End Sub
    
        Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
    
            ' For some reason non-visible panel aren't
            ' part of the list so don't change ActiveTabIndex
            ' since the index of panel2 becomes 0
    
            TabPanel1.Visible = False
            TabPanel2.Visible = True
    
        End Sub

  5. #5
    Join Date
    Dec 2007
    Posts
    13

    Re: Ajax Control Toolkit Tab Panel

    You can use a open source framework to do this. I know that zk is a very perfect ajax framework. it can do this very easily. You'd better to see whether it can help you about doing this.




    -----------------------------------------------
    codeuu,source code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured