You must Sign In to post a response.
  • Category: ASP.NET

    Automatically move cursor from one Tab control to another in ajax Tab container control

    I am using AjaxControlToolkit TabContainer control with two TabPanels having id as "firstTab" and "secondTab". The first tab has a label control and two text box ,second tab has a two dropdownlist.
    First I have entry values in two text box under "firstTab" then move to "Second Tab" i have to click on "Second tab".
    Here i am a query that -after entering values in "first Tab" i will move to next tab("Second tab") by using cursor with out click on "Second tab".
  • #767032
    Hi,
    Do this:
    1. Fire OnClientActiveTabChanged clientside event of TabContainer, here you can call

    javascript$get('ControlIdYouWantToFocus').focus();

    to set the focus on the control.
    OR
    2.

    <script type="text/javascript">
    $(function ()
    {
    setTimeout(function ()
    {
    $("[#ControlIdYouWantToFocus]").focus();
    }, 100);
    });
    </script>


Sign In to post your comments