How to maintain tab sequence when AutoPostBack is "True"?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Billie Hartline
    New Member
    • Jan 2011
    • 7

    How to maintain tab sequence when AutoPostBack is "True"?

    I am an untrained volunteer seekeing help.

    I have several input pages where I autopostback is marked "True", when I enter the data or select the entry. The page flashes a losses its normal tab sequence. How can I mainatin teh Tab Sequence (focus)?

    Exmaples
    Code:
     <asp:DropDownList id="DropDownListq1" runat="server"                       DataSourceID="SqlDataSource1" DataTextField="True-False" 
    DataValueField="True-False" AutoPostBack="True"  OnSelectedIndexChanged="DropDownListq1_SelectionChanged" ></asp:DropDownList>
    or
    Code:
    <asp:TextBox                                    id="TextBoxPlayFname" runat="server" AutoPostBack="true"                                  OnTextChanged="TextBoxPlayFname_TextChanged" AutoCompleteType="Disabled" ></asp:TextBox>
    Thank you for your help in advance.

    Billie
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Consider placing the content in the tabs into UpdatePanels. This will get rid of the flash and should maintain the proper tab selection upon refreshing.

    Otherwise, you need to check the selected tab in the PageLoad event, then set the proper tab in the PagePreRender event.

    There may be a way fro the tab control to remember it's selection. It's likely that you will have to ensure that the ViewState for the tab control is set to enabled.

    -Frinny

    Comment

    Working...