Is there anyway to avoid showing the Tabs panel until the postback happens?

Last post 05-09-2008 11:03 AM by Jonathan Shen – MSFT. 3 replies.

Sort Posts:

  • Is there anyway to avoid showing the Tabs panel until the postback happens?

    05-04-2008, 10:53 PM
    • Loading...
    • sonasonia
    • Joined on 03-12-2007, 7:43 AM
    • Posts 7

    Hi,

    Recently I started using the AJAX control toolkit Tabs. 

    I do a postback when the tab is clicked, the problem is it shows the panel first and then refresh the screen later.  It looks like that the screen is refreshed twice.

    Initially my panel will be without the data and when the postback happens then it would get the information into the panel.  

    Is there anyway to avoid showing the panel until the postback happens?

    Thanks in advance. 

     

     

     

     

     

     

  • Re: Is there anyway to avoid showing the Tabs panel until the postback happens?

    05-05-2008, 2:11 AM
    • Loading...
    • Devaang
    • Joined on 04-23-2008, 1:19 PM
    • Posts 34

    HI, if u r binding the tabs in page load then try to bind in if(!ispostback)

    Thanks 

    Devaang
  • Re: Is there anyway to avoid showing the Tabs panel until the postback happens?

    05-05-2008, 3:47 AM
    • Loading...
    • sonasonia
    • Joined on 03-12-2007, 7:43 AM
    • Posts 7
    I do not do any binding at the back end. I use the user controls to get the data into the panels. How can I avoid showing the panel before the postback happens? part of my aspx code is below.

    <form id="form1" runat="server">
          
    <asp:ScriptManager ID="ScriptManager1"  EnableScriptGlobalization="true"  EnableScriptLocalization="true" runat="server" EnablePageMethods="true"></asp:ScriptManager>
            <Header:MainMenu ID="mainmenu" runat="server" />
            <br />
            <p class="addEditHeader">
                <%=Page.Title %>
            </p>
            <ajaxToolkit:TabContainer runat="server" ID="Tabs" Height="400px"  ScrollBars="Auto"  Width="100%" AutoPostBack="True"  OnActiveTabChanged="SetDLId"  ActiveTabIndex="0" >
               <ajaxToolkit:TabPanel runat="server" ID="Panel2" HeaderText="Distribution List Item Entry">
                    <ContentTemplate>
                        <asp:UpdatePanel ID="updatePanel1" runat="server">
                            <ContentTemplate>
                                <DL:Entry ID="DLEntry" runat="server"  />
                               
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
                <ajaxToolkit:TabPanel runat="server" ID="Panel3" HeaderText="Distribution List View"   Width="98%" >
                    <ContentTemplate>
                         <DLReport:DLRep ID="Rep" runat="server" />
                    </ContentTemplate>
                </ajaxToolkit:TabPanel>
            </ajaxToolkit:TabContainer>
        </form>     
  • Re: Is there anyway to avoid showing the Tabs panel until the postback happens?

    05-09-2008, 11:03 AM
    Answer

    Hi Sonasonia,

    Switch from tabs is fired by javascript, it is occurred before postback, so if you page is complex, your phenomenon is obvious.  But it won't cause double postback.  We suggest that you'd better use a debugging tool such as Fiddler, Web Development Helper to detect which control caused the double postback, and do some modifications.

    Best regards,

    Jonathan

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (4 items)