AjaxToolkit: the last TabContainer on the page is focused on page load

前端 未结 5 2044
梦毁少年i
梦毁少年i 2021-01-18 07:00

I\'m using more than one TabContainer on a page in an ASP.NET project and I noticed a really strange behavior: when the page is loaded the focus jumps to the last TabContain

5条回答
  •  遥遥无期
    2021-01-18 07:08

    I had a similar problem, but I found a more simple solution.

    In the case you use a:

    
              
    

    and more panel in the tab container ( 3 for example):

     
    
    
    
    
    

    For example, you can use the property:

     ActiveTabIndex="0"
    

    OR

    tc1.ActiveTabIndex = 2 'code behind
    

    Where the integer is the ID of the tab you want to Focus.

    It works for me! I Hope I can Help someone!

    Enjoy

提交回复
热议问题