Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
685
Ultrawebtab post back when autopostback = false
posted

I have a fairly simple implementation of an Ultrawebtab with six tabs with content panes.  Under certain circumstances (running locally on XP with IE8 or on the server Win 7 with IE9) the tab click event will cause postback and clear out any navigating I have done in the content panes.  I need to maintain the state of the various tabs as the user tabs through them and this postback causes the page to revert to original form.  How can I prevent a postback when a tab click has been made?  The Autopostback value is not set.  Code:

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Menu.aspx.vb" Inherits="Menu"
    StylesheetTheme="Office2007Blue" %>

<%@ Register Assembly="Infragistics2.WebUI.UltraWebTab.v11.1, Version=11.1.20111.2020, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.UltraWebTab" TagPrefix="igtab" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script type="text/javascript" id="igClientScript">

        function UltraWebTab1_Click(oWebTab, oTab, oEvent) {
            document.getElementById('UltraWebTab1_cp').height = document.documentElement.offsetHeight - 30;
            return false;
        }

        window.onresize = function() {
            document.getElementById('UltraWebTab1_cp').height = document.documentElement.offsetHeight - 30
        };

        function UltraWebTab1_BeforeSelectedTabChange(oWebTab, oTab, oEvent) {
            if (oTab.getIndex() == 6) {
                if (confirm('Are you sure you want to exit?') == true) {
                    window.location = 'logout.aspx';
                }
                else {
                    oEvent.cancel = true;
                }
            }
        }

        function UltraWebTab1_InitializeTabs(oWebTab) {
            document.getElementById('UltraWebTab1_cp').height = document.documentElement.offsetHeight - 30
        }
    </script>

</head>
<body style="overflow: hidden;">
    <form id="form1" runat="server">
    <igtab:UltraWebTab ID="UltraWebTab1" runat="server" Width="100%" BarHeight="0">
        <Tabs>
            <igtab:Tab Text="Admin" Tooltip="Admin" Key="0">
                <ContentPane TargetUrl="/PrismManagement/Admin/AdminHome.aspx">
                </ContentPane>
            </igtab:Tab>
            <igtab:Tab Text="Fishbowl" Tooltip="Fishbowl" Key="1">
                <ContentPane TargetUrl="/PrismManagement/Fishbowl/FishbowlHome.aspx">
                </ContentPane>
            </igtab:Tab>
            <igtab:Tab Text="Marketing" Tooltip="Marketing" Key="2">
                <ContentPane TargetUrl="/PrismManagement/Marketing/MarketingHome.aspx">
                </ContentPane>
            </igtab:Tab>
            <igtab:Tab Text="Member Services" Tooltip="Member Services" Key="3">
                <ContentPane TargetUrl="/PrismManagement/MS/MSHome.aspx">
                </ContentPane>
            </igtab:Tab>
            <igtab:Tab Text="Quality Assurance" Tooltip="Quality Assurance" Key="4">
                <ContentPane TargetUrl="/PrismManagement/QA/QAHome.aspx">
                </ContentPane>
            </igtab:Tab>
            <igtab:Tab Text="Report Finder" Tooltip="Report Finder" Key="5">
                <ContentPane TargetUrl="/PrismManagement/Reports/ReportsWizard.aspx">
                </ContentPane>
            </igtab:Tab>
            <igtab:Tab DefaultImage="./App_Themes/Office2007Blue/images/16x16/Logout.gif" ImageAlign="Middle"
                Tooltip="Logout" Key="6">
            </igtab:Tab>
        </Tabs>
        <ClientSideEvents BeforeSelectedTabChange="UltraWebTab1_BeforeSelectedTabChange"
            Click="UltraWebTab1_Click" InitializeTabs="UltraWebTab1_InitializeTabs" />
        <RoundedImage FillStyle="LeftMergedWithCenter" HoverImage="[ig_tab_winXP2.gif]" LeftSideWidth="7"
            NormalImage="[ig_tab_winXP3.gif]" RightSideWidth="6" SelectedImage="[ig_tab_winXP1.gif]"
            ShiftOfImages="2" />
        <BorderDetails StyleBottom="Solid" StyleLeft="Solid" StyleRight="Solid" StyleTop="Solid"
            WidthBottom="0px" WidthLeft="0px" WidthRight="0px" WidthTop="0px" />
        <SelectedTabStyle>
            <Padding Bottom="2px" />
        </SelectedTabStyle>
        <DefaultTabStyle BackColor="#FEFCFD" Font-Names="Microsoft Sans Serif" Font-Size="8pt"
            ForeColor="Black" Height="22px">
            <Padding Top="2px" />
        </DefaultTabStyle>
    </igtab:UltraWebTab>
    </form>
</body>
</html>