Solved

ajaxToolkit:TabContainer keeps automatically generating copies of all tabpanels on aspx page

Posted on 2014-02-07
2
582 Views
Last Modified: 2014-02-10
Hi Experts,

This is really weird. I have an aspx page with an Ajax Tabcontainer with 3 tab panels. Each time I make an update to code inside this on aspx page or do a rebuild of the solution is basically automatically generates a copy of all the tabpanels inside the tab container and then comes up with a bunch of warnings saying there are duplicate controls.

By deleting the duplicate code I am able to run things fine but it keeps doing it all the time which is really annoying

Anyone come across this before?

This is the portion of code on the aspx page:

   <div style="float:left;width:98%;margin-right:1%;margin-left:1%;text-align:left">
    <asp:Panel Width="100%" ScrollBars="Auto" runat="server">
        <ajaxToolkit:TabContainer ID="TabContainer1" runat="server">
        <ajaxToolkit:TabPanel runat="server" HeaderText="Calculated Statistics" ID="TabPanel5">
        <ContentTemplate>
        <div style="float:left;width:40%">
        <asp:Label ID="Label1" runat="server" Text="Calculated results based on measurements" Font-Bold="True" Font-Size="X-Small" ></asp:Label>  
        <asp:GridView ID="GridView2" runat="server" DataSourceID="SqlDataSource1" AllowPaging="True" AllowSorting="True" Font-Bold="true"
            AutoGenerateColumns="False" CellPadding="4" DataKeyNames="Userid,StatDate"
            ForeColor="#333333" GridLines="Both" Font-Size="X-Small" width="98%"
            EmptyDataText="No measurements have been entered yet" BorderStyle="Solid"
            ShowFooter="True" PageSize="20">
            <Columns>
                <asp:BoundField DataField="Userid" HeaderText="Userid" ReadOnly="True"
                    SortExpression="Userid" Visible="False" />
                <asp:BoundField DataField="StatDate" HeaderText="Date" ReadOnly="True"
                    SortExpression="StatDate" DataFormatString="{0:d}" HtmlEncode=false />
                <asp:BoundField DataField="Height" HeaderText="Height" SortExpression="Height"
                    Visible="False" />
                <asp:BoundField DataField="Weight" HeaderText="Weight" SortExpression="Weight"
                    Visible="False" />
                <asp:BoundField DataField="Neck" HeaderText="Neck" SortExpression="Neck"
                    Visible="False" />
                <asp:BoundField DataField="Bicep" HeaderText="Bicep" SortExpression="Bicep"
                    Visible="False" />
                <asp:BoundField DataField="Chest" HeaderText="Chest" SortExpression="Chest"
                    Visible="False" />
                <asp:BoundField DataField="Abdomen" HeaderText="Abdomen"
                    SortExpression="Abdomen" Visible="False" />
                <asp:BoundField DataField="Waist" HeaderText="Waist" SortExpression="Waist"
                    Visible="False" />
                <asp:BoundField DataField="Hip" HeaderText="Hip" SortExpression="Hip"
                    Visible="False" />
                <asp:BoundField DataField="BMR" HeaderText="BMR" SortExpression="BMR" />
                <asp:BoundField DataField="BMRA" HeaderText="BMR(A)" SortExpression="BMR(A)" />
                <asp:BoundField DataField="BMI" HeaderText="BMI" SortExpression="BMI" />
                <asp:BoundField DataField="BF" HeaderText="BF%" SortExpression="BF" />
                <asp:BoundField DataField="WalkOrRunTest" HeaderText="WalkOrRunTest"
                    SortExpression="WalkOrRunTest" Visible="False" />
                <asp:BoundField DataField="WalkOrRunTime" HeaderText="WalkOrRunTime"
                    SortExpression="WalkOrRunTime" Visible="False" />
                <asp:BoundField DataField="WalkOrRunHeartRate" HeaderText="WalkOrRunHeartRate"
                    SortExpression="WalkOrRunHeartRate" Visible="False" />
                <asp:BoundField DataField="PushupTest" HeaderText="PushupTest"
                    SortExpression="PushupTest" Visible="False" />
                <asp:BoundField DataField="PlankTest" HeaderText="PlankTest"
                    SortExpression="PlankTest" Visible="False" />
                <asp:BoundField DataField="VO2MaxResult" HeaderText="CV Test"
                    SortExpression="VO2MaxResult" />
                <asp:BoundField DataField="BPS" HeaderText="BPS" SortExpression="BPS" />
                <asp:BoundField DataField="BPD" HeaderText="BPD" SortExpression="BPD" />
                <asp:BoundField DataField="RHR" HeaderText="RHR" SortExpression="RHR" />
            </Columns>
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        </div>
        <div style="float:right;width:55%">
        <asp:Label ID="Label2" runat="server" Text="Color key for calculated results" Font-Bold="True" Font-Size="X-Small" ></asp:Label>
        <asp:GridView ID="GridView4" runat="server" CellPadding="4"
                DataSourceID="SqlDataSource3" ForeColor="#333333" GridLines="None" font-bold="true" Font-Size="XX-Small"
                AutoGenerateColumns="False" ShowHeader="false" Showfooter="false" OnRowCommand="GridView4_RowCommand">
                <Columns>
                    <asp:ButtonField ButtonType=Link DataTextField="Rating" CommandName="ShowDetail" />
                    <asp:BoundField DataField="Rating1" HeaderText=""
                        SortExpression="Rating1" />
                    <asp:BoundField DataField="Rating2" HeaderText=""
                        SortExpression="Rating2" />
                    <asp:BoundField DataField="Rating3" HeaderText=""
                        SortExpression="Rating3" />
                    <asp:BoundField DataField="Rating4" HeaderText=""
                        SortExpression="Rating4" />
                    <asp:BoundField DataField="Rating5" HeaderText=""
                        SortExpression="Rating5" />
                    <asp:BoundField DataField="Rating6" HeaderText=""
                        SortExpression="Rating6" />
                    <asp:BoundField DataField="Rating7" HeaderText=""
                        SortExpression="Rating7" />
                    <asp:BoundField DataField="Rating8" HeaderText=""
                        SortExpression="Rating8" />
                </Columns>
                <EditRowStyle BackColor="#999999" />
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
            </asp:GridView>
<asp:Label ID="Label6" runat="server" Text="Calculated heart rate percentage effort" Font-Bold="True" Font-Size="X-Small" ></asp:Label>  
            <asp:GridView ID="GridView6" runat="server" AutoGenerateColumns="False"
                    BorderStyle="Solid" CellPadding="4" font-bold="True" Font-Size="X-Small"
                    ForeColor="#333333" OnDataBinding="GridView6_DataBinding" Width="98%">
                    <Columns>
                        <asp:boundfield Datafield="RHR" HeaderText="RHR" />
                        <asp:boundfield Datafield="10PC" HeaderText="10%" />
                        <asp:boundfield Datafield="20PC" HeaderText="20%" />
                        <asp:boundfield Datafield="30PC" HeaderText="30%" />
                        <asp:boundfield Datafield="40PC" HeaderText="40%" />
                        <asp:boundfield Datafield="50PC" HeaderText="50%" />
                        <asp:boundfield Datafield="60PC" HeaderText="60%" />
                        <asp:boundfield Datafield="70PC" HeaderText="70%" />
                        <asp:boundfield Datafield="80PC" HeaderText="80%" />
                        <asp:boundfield Datafield="90PC" HeaderText="90%" />
                        <asp:boundfield Datafield="MAX" HeaderText="MAX" />
                    </Columns>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
            <asp:Label ID="Label3" runat="server" Text="Calculated exercise levels based on tests" Font-Bold="True" Font-Size="X-Small" ></asp:Label>  
            <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource2" CellPadding="4"
                ForeColor="#333333"  Font-Size="X-Small" Width="98%" font-bold="true"
                EmptyDataText="No measurements have been entered yet" BorderStyle="Solid">
                <Columns>
                    <asp:BoundField DataField="Body_Area" HeaderText="Body Area"
                        SortExpression="Body_Area" />
                    <asp:BoundField DataField="Level" HeaderText="Level" SortExpression="Level" />
                </Columns>
                <EditRowStyle BackColor="#999999" />
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#E9E7E2" />
                <SortedAscendingHeaderStyle BackColor="#506C8C" />
                <SortedDescendingCellStyle BackColor="#FFFDF8" />
                <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
            </asp:GridView>
        </div>
        <div style="float:left; width:100%">
        <asp:Panel id=Panel2 Width="100%" ScrollBars="Auto" runat="server">
        <asp:Button ID="Button1" runat="server" Font-Size="Small"
            Text="Add Your Measurements" Width="100%" />
        </asp:Panel>
        </div>
        </ContentTemplate>
        </ajaxToolkit:TabPanel>
        <ajaxToolkit:TabPanel runat="server" HeaderText="Statistics" ID="TabPanel4">
        <ContentTemplate>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True"
            AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Userid,StatDate"
            DataSourceID="SqlDataSource1"  Width="100%" CellPadding="4"
            ForeColor="#333333" Font-Size="X-Small" font-bold="true"
            EmptyDataText="No measurements have been entered ye" BorderStyle="Solid" PageSize="20">
            <Columns>
                <asp:BoundField DataField="Userid" HeaderText="Userid" ReadOnly="True"
                    SortExpression="Userid" Visible="False" />
                <asp:BoundField DataField="StatDate" HeaderText="Date" ReadOnly="True"
                    SortExpression="StatDate" DataFormatString="{0:d}" HtmlEncode=false>
                </asp:BoundField>
                <asp:BoundField DataField="Height" HeaderText="Height"
                    SortExpression="Height" >
                </asp:BoundField>
                <asp:BoundField DataField="Weight" HeaderText="Weight"
                    SortExpression="Weight" />
                <asp:BoundField DataField="Neck" HeaderText="Neck" SortExpression="Neck" />
                <asp:BoundField DataField="Bicep" HeaderText="Bicep" SortExpression="Bicep" />
                <asp:BoundField DataField="Chest" HeaderText="Chest" SortExpression="Chest" />
                <asp:BoundField DataField="Abdomen" HeaderText="Abdomen"
                    SortExpression="Abdomen" />
                <asp:BoundField DataField="Waist" HeaderText="Waist" SortExpression="Waist" />
                <asp:BoundField DataField="Hip" HeaderText="Hip" SortExpression="Hip" />
                <asp:BoundField DataField="BPS" HeaderText="BPS" SortExpression="BPS" visible="false"/>
                <asp:BoundField DataField="BPD" HeaderText="BPD" SortExpression="BPD" visible="false"/>
                <asp:BoundField DataField="RHR" HeaderText="RHR" SortExpression="RHR" visible="false"/>
                <asp:BoundField DataField="BMR" HeaderText="BMR"
                    SortExpression="BMR" Visible="False" />
                <asp:BoundField DataField="BMRA" HeaderText="BMRA"
                    SortExpression="BMRA" Visible="False" />
                <asp:BoundField DataField="BMI" HeaderText="BMI" SortExpression="BMI"
                    Visible="False" />
                <asp:BoundField DataField="BF" HeaderText="BF" SortExpression="BF"
                    Visible="False" />
                <asp:BoundField DataField="WalkOrRunTest" HeaderText="CV Test"
                    SortExpression="WalkOrRunTest" />
                <asp:BoundField DataField="WalkOrRunTime" HeaderText="CV Time"
                    SortExpression="WalkOrRunTime" />
                <asp:BoundField DataField="WalkOrRunHeartRate" HeaderText="CV HRE"
                    SortExpression="WalkOrRunHeartRate" />
                <asp:BoundField DataField="PushupTest" HeaderText="Pushups"
                    SortExpression="PushupTest" />
                <asp:BoundField DataField="PlankTest" HeaderText="Plank"
                    SortExpression="PlankTest" />
                <asp:BoundField DataField="SquatTest" HeaderText="Squats"
                    SortExpression="SquatTest" />
                <asp:BoundField DataField="BurpeeTest" HeaderText="Burpees"
                    SortExpression="BurpeeTest" />
                <asp:BoundField DataField="VO2MaxResult" HeaderText="VO2MaxResult"
                    SortExpression="VO2MaxResult" Visible="False" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        </ContentTemplate>
        </ajaxToolkit:TabPanel>
        <ajaxToolkit:TabPanel runat="server" HeaderText="Nutrition" ID="TabPanel1">
            <ContentTemplate>
                <asp:Label ID="Label4" runat="server" Text="Nutrition Information Based on BMR(A) and BF% (Showing Grams/Calories)" Font-Bold="True" Font-Size="X-Small" ></asp:Label>
                <asp:GridView ID="GridView5" runat="server" AutoGenerateColumns="False"
                    BorderStyle="Solid" CellPadding="4" font-bold="True" Font-Size="X-Small"
                    ForeColor="#333333" OnDataBinding="GridView5_DataBinding" Width="98%">
                    <Columns>
                        <asp:boundfield Datafield="Macro" HeaderText="Macro" />
                        <asp:boundfield Datafield="Breakfast" HeaderText="Breakfast" />
                        <asp:boundfield Datafield="Snack(AM)" HeaderText="Snack(AM)" />
                        <asp:boundfield Datafield="Lunch" HeaderText="Lunch" />
                        <asp:boundfield Datafield="Snack(PM)" HeaderText="Snack(PM)" />
                        <asp:boundfield Datafield="Dinner" HeaderText="Dinner" />
                    </Columns>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
                <div style="float:left;width:55%">
                <asp:Label ID="Label5" runat="server" Text="Food Search" Font-Bold="True" Font-Size="X-Small" Width="93%" BackColor="#5D7B9D" ForeColor="White" ></asp:Label>
                <br />
                <asp:TextBox ID="MainFood" runat="server" width="78%" Font-Size="X-Small" Font-Bold="true" ToolTip="Enter the item you want to search for and click the 'Search' button"></asp:TextBox>
                <asp:Button ID="Button2" runat="server" Text="Search" OnClick="Button2_Click" Font-Bold="true" Font-Size="X-Small"/>
                </div>
                <div style="float:right;width:45%">
                <asp:Panel ID="Panel3" ScrollBars="Vertical" Width="100%" runat="server" Height="350px">
                    <asp:Label ID="Label11" runat="server" Text="Food Diary" Font-Bold="True" Font-Size="X-Small" ></asp:Label>
                    <asp:TextBox ID="DiaryDate" runat="server" Width="60px" Font-Size="X-Small" OnTextChanged="DiaryDate_TextChanged" AutoPostBack="True" ToolTip="Click to change date"></asp:TextBox><ajaxToolkit:CalendarExtender
                        ID="CalendarExtender1" runat="server" TargetControlID="DiaryDate" Format="dd-MMM-yy">
                    </ajaxToolkit:CalendarExtender>
                    <asp:GridView ID="GridView8" runat="server" AutoGenerateColumns="False"
                    CellPadding="4" DataKeyNames="Userid,DietDate,Meal,FoodDescription,PortionSize"
                    DataSourceID="SqlDataSource5" ForeColor="#333333" GridLines="Both" Font-Bold="true" Font-size="XX-Small" Width="100%" ShowFooter="true">
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <Columns>
                        <asp:BoundField DataField="Userid" HeaderText="Userid" ReadOnly="True"
                            SortExpression="Userid" visible="false"/>
                        <asp:BoundField DataField="DietDate" HeaderText="DietDate" ReadOnly="True"
                            SortExpression="DietDate" visible="false"/>
                        <asp:BoundField DataField="Meal" HeaderText="Meal" ReadOnly="True"
                            SortExpression="Meal" />
                        <asp:BoundField DataField="FoodDescription" HeaderText="Item"
                            ReadOnly="True" SortExpression="FoodDescription" />
                        <asp:BoundField DataField="PortionSize" HeaderText="Weight"
                            ReadOnly="True" SortExpression="PortionSize" />
                        <asp:BoundField DataField="Quantity" HeaderText="Qty"
                            SortExpression="Quantity" />
                        <asp:BoundField DataField="Calories" HeaderText="Calories"
                            SortExpression="Calories" />
                    </Columns>
                    <EditRowStyle BackColor="#999999" />
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
                 <asp:Label ID="Label13" runat="server" Text="Food Diary Summary" Font-Bold="True" Font-Size="X-Small" ></asp:Label>
                <asp:GridView ID="GridView9" runat="server" AutoGenerateColumns="False" Font-Bold="true" Font-Size="XX-Small">
                    <Columns>
                        <asp:BoundField DataField="Nutrient_description"
                            HeaderText="Nutrient" SortExpression="Nutrient_description" />
                        <asp:BoundField DataField="Nutrient_value" HeaderText="Per 100g"
                            SortExpression="Nutrient_value" />
                        <asp:BoundField DataField="Unit" HeaderText="Unit" SortExpression="Unit" />
                        <asp:BoundField DataField="Portion_weight" HeaderText="Portion_weight"
                            SortExpression="Portion_weight" visible=false/>
                        <asp:TemplateField HeaderText="Portion"></asp:TemplateField>
                        <asp:TemplateField HeaderText="%RDA"></asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
                </asp:Panel>
                </div>
                <div style="float:left;width:55%">
                <asp:Label ID="Label7" runat="server" Text="Results" Font-Bold="True" Font-Size="X-Small" Width="93%" BackColor="#5D7B9D" ForeColor="White" ></asp:Label>
                <asp:ListBox ID="MainFoodResult" runat="server" width="93%" Font-Size="XX-Small" Font-Bold="true" OnSelectedIndexChanged="MainFoodResult_SelectedIndexChanged" AutoPostBack="True"></asp:ListBox>
                <asp:Label ID="FoodStat" runat="server" Width="93%" Font-Size="XX-Small"></asp:Label>
                </div>
                <div style="float:left;width:55%">
                <asp:Label ID="Label8" runat="server" Text="Portion Sizes Found" Font-Bold="True" Font-Size="X-Small" Width="93%" BackColor="#5D7B9D" ForeColor="White"></asp:Label>
                <asp:ListBox ID="FoodPortions" runat="server" width="93%" Font-Size="XX-Small" Font-Bold="true"  OnSelectedIndexChanged="FoodPortions_SelectedIndexChanged" AutoPostBack="True"></asp:ListBox>
                </div>
                <div style="float:left;width:51%;Height:40%">
                <br />
                <asp:Label ID="Label9" runat="server" Text="Item Detail" Font-Bold="True" Font-Size="X-Small" Width="100%" BackColor="#5D7B9D" ForeColor="White"></asp:Label>
                <asp:Panel ID="Panel1" ScrollBars="Vertical" Width="100%" runat="server" Height="150px" BorderStyle="Solid" BorderWidth="1px">
                <asp:GridView ID="GridView7" runat="server" AutoGenerateColumns="False"
                    DataSourceID="SqlDataSource4" Font-Bold="true" Font-Size="XX-Small">
                    <Columns>
                        <asp:BoundField DataField="Nutrient_description"
                            HeaderText="Nutrient" SortExpression="Nutrient_description" />
                        <asp:BoundField DataField="Nutrient_value" HeaderText="Per 100g"
                            SortExpression="Nutrient_value" />
                        <asp:BoundField DataField="Unit" HeaderText="Unit" SortExpression="Unit" />
                        <asp:BoundField DataField="Portion_weight" HeaderText="Portion_weight"
                            SortExpression="Portion_weight" visible=false/>
                        <asp:TemplateField HeaderText="Portion"></asp:TemplateField>
                        <asp:TemplateField HeaderText="%RDA"></asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
                </asp:Panel>
                <asp:Panel runat="server" Width="100%" DefaultButton="AddToDiary">
                <div style="float:left;width:45%">
                <asp:Label ID="Label10" runat="server" Text="Adjust Weight:" Font-Bold="True" Font-Size="X-Small"></asp:Label>
                <asp:TextBox ID="PortionVal" runat="server" Width="10%" Font-Size="X-Small" Tooltip="If the portion size is not correct, enter the weight in grams of the item here" OnTextChanged="PortionVal_TextChanged" AutoPostBack="false"></asp:TextBox>
                <asp:Label ID="Label12" runat="server" Text="gms" Font-Bold="True" Font-Size="X-Small"></asp:Label>
                </div>
                <div style="float:right;width:55%;Text-Align:left">
                <asp:Label ID="SelectMeal" runat="server" Text="Select Meal" Font-Size="X-Small" Font-Bold="true"></asp:Label><asp:DropDownList ID="MealList" runat="server" Font-Size="X-Small">
                </asp:DropDownList>
                </div>
                <asp:Button ID="AddToDiary" runat="server" OnClick="AddToDiary_Click" Text="Add To Diary" Width="100%" Font-Bold="true" Font-Size="X-Small"/>
                <asp:Label ID="StatusLine" runat="server" Width="100%"></asp:Label>
                </asp:Panel>
                </div>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
           
        </ajaxToolkit:TabContainer>
    </asp:Panel>
    </div>

Cheers

Steve
0
Comment
Question by:GYMM8
  • 2
2 Comments
 

Accepted Solution

by:
GYMM8 earned 0 total points
ID: 39846731
Okay I've managed to fix this. Basically within my tab container I had a call to an ajax update panel and two scripts which were sitting outside the bounds of the tabcontainer control. Once I placed these within the tabcontainer contenttemplate it fixed the problem
0
 

Author Closing Comment

by:GYMM8
ID: 39846733
I am sometimes too quick to ask a question but clearly this was quite an unusual one as no-one responded so rather than deleting it I have left in place so hopefully if someone else is this stupid then they will be able to see it's a simple solution
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question