Well guys, I thought I had the answer. Turns out, that fixed the problem on one page, but for the life of me, I can't get it to work on this page below. I've spent days scouring the internet looking for a solutions to no avail. I think it has something to do with the IE haslayout bug, but I don't know what to do to correct it. I've tried about 1000 things with no luck so I'm posting my code for some desperately needed help! This page works perfectly in Chrome, but in IE7, it displays for 1 second, then disappears. The visible state on the gridview is false, but my code-behind sets it to true when the search button is clicked; and yes, I've tried setting it to true all the time and it doesn't work. Thanks all!
Protected Sub Search_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Search.Click
MatchingRecipesDataGrid.Visible = True
GetMatchingRecipesDataSource.DataBind()
myHeaderMessage.Text = ""
myFooterMessage.Text = ""
IngredientsforRecipe.Visible = False
StepsforRecipe.Visible = False
'MatchingRecipesDataGrid.DataBind()
End Sub
<style type="text/css">
.style10
{
width: 428px;
}
.style12
{
color: #1D3362;
}
.style13
{
width: 308px;
}
.selectedrowstyle
{
color: #FFFFFF;
background-color: #500000;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="WebService.asmx" />
</Services>
</asp:ScriptManager>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" MinimumPrefixLength="1"
ServicePath="WebService.asmx" ServiceMethod="GetItemList" TargetControlID="SearchBox"
CompletionSetCount="10" />
<asp:TextBox ID="SearchBox" runat="server" Width="279px"></asp:TextBox>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Value="All Recipes"></asp:ListItem>
<asp:ListItem Value="My Recipes"></asp:ListItem>
<asp:ListItem Value="Public Recipes"></asp:ListItem>
</asp:DropDownList>
<asp:LinkButton ID="Search" runat="server" ForeColor="#500000">Search Keywords</asp:LinkButton>
<asp:LinkButton ID="LinkButton1" runat="server" ForeColor="#500000">Clear Search</asp:LinkButton>
<br />
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="slider1" EventName="textchanged" />
</Triggers>
<ContentTemplate>
<asp:Panel ID="Panel1" runat="server" >
<cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" Color="80, 0, 0"
Radius="10" TargetControlID="Panel1" />
<table>
<tr>
<td>
<asp:SqlDataSource ID="GetMatchingRecipesDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:TekComConnection %>"
SelectCommand="SELECT A.RECIPE_ID, A.RECIPE_NAME, A.RECIPE_CATEGORY, A.RECIPE_TYPE FROM TB_RECIPE AS A LEFT OUTER JOIN TB_RECIPE_USER_DETAILS AS C ON A.RECIPE_ID = C.RECIPE_ID LEFT OUTER JOIN TB_INGREDIENTS AS B ON A.RECIPE_ID = B.RECIPE_ID WHERE ((A.PUBLIC_STATUS = @PublicStatus OR A.PUBLIC_STATUS = @PublicStatus2) AND (B.INGREDIENT_NAME LIKE @SearchTerm) AND (C.USER_ID LIKE @RecipeOwner)) OR ((A.PUBLIC_STATUS = @PublicStatus OR A.PUBLIC_STATUS = @PublicStatus2) AND (A.RECIPE_NAME LIKE @SearchTerm) AND (C.USER_ID LIKE @RecipeOwner)) GROUP BY A.RECIPE_ID, A.RECIPE_NAME, A.RECIPE_CATEGORY, A.RECIPE_TYPE ORDER BY A.RECIPE_NAME">
<SelectParameters>
<asp:Parameter Name="PublicStatus" />
<asp:Parameter Name="PublicStatus2" />
<asp:Parameter Name="SearchTerm" />
<asp:Parameter Name="RecipeOwner" />
</SelectParameters>
</asp:SqlDataSource>
<span class="style12">
<asp:Label ID="Label3" runat="server" Visible="false" Text="Use this slider to change the number of items per page." />
<br />
<asp:Label ID="YouCanNowSee" runat="server" Visible="false" Text="You can now see " />
<asp:Label ID="SliderValueDisplay" Visible="false" runat="server" />
<asp:Label ID="ItemsPerPage" runat="server" Visible="false" Text=" items per page." />
</span>
<br />
<asp:TextBox ID="Slider1" runat="server" Visible="false" Text="3" AutoPostBack="true"></asp:TextBox>
<!--<asp:TextBox ID="Slider1_BoundControl" runat="server"></asp:TextBox>-->
<cc1:SliderExtender ID="Slider1Extender" runat="server" TargetControlID="Slider1"
BoundControlID="SliderValueDisplay" Orientation="Horizontal" EnableHandleAnimation="true"
Minimum="3" Maximum="35" />
<br />
<asp:Label ID="myHeaderMessage" runat="server" Style="color: #500000"></asp:Label>
<br />
<cc1:RoundedCornersExtender ID="RoundedCornersExtender2" runat="server" Color="29, 51, 98"
Radius="10" TargetControlID="MatchingRecipesDataGrid">
</cc1:RoundedCornersExtender>
<asp:GridView ID="MatchingRecipesDataGrid" runat="server" AutoGenerateColumns="False"
DataSourceID="GetMatchingRecipesDataSource"
DataKeyNames="RECIPE_ID"
AllowSorting="True"
AllowPaging="True"
ForeColor="#1D3362"
OnSelectedIndexChanged="MatchingRecipesDataGrid_SelectedIndexChanged"
OnPageIndexChanging="ResetDetails"
Visible="False"
BorderStyle="None">
<Columns>
<asp:CommandField SelectText="Details" ShowSelectButton="True">
<ControlStyle ForeColor="#500000" />
</asp:CommandField>
<asp:BoundField DataField="RECIPE_ID" HeaderText="ID" SortExpression="RECIPE_ID">
<HeaderStyle ForeColor="#EEE1C6" Font-Size="1" Width="2px" />
<ItemStyle HorizontalAlign="Center" Font-Size="1" ForeColor="#EEE1C6" />
</asp:BoundField>
<asp:BoundField DataField="RECIPE_NAME" HeaderText="Recipe Name" SortExpression="RECIPE_NAME">
<HeaderStyle ForeColor="#500000" />
</asp:BoundField>
<asp:BoundField DataField="RECIPE_CATEGORY" HeaderText="Recipe Category" SortExpression="RECIPE_CATEGORY">
<HeaderStyle ForeColor="#500000" />
<ItemStyle HorizontalAlign="Center" Width="50px" />
</asp:BoundField>
<asp:BoundField DataField="RECIPE_TYPE" HeaderText="Recipe Type" SortExpression="RECIPE_TYPE">
<HeaderStyle ForeColor="#500000" />
<ItemStyle HorizontalAlign="Center" Width="50px" />
</asp:BoundField>
<asp:TemplateField HeaderText="My Recipe">
<ItemTemplate>
<asp:Image ID="MyRecipeImage" runat="server" Height="15px" ImageUrl="~/Images/PantryPlannerLogo.png" />
<asp:LinkButton ID="AddLinkButton" runat="server" ForeColor="#500000" OnClick="AddLinkButton_Click">Add</asp:LinkButton>
</ItemTemplate>
<HeaderStyle ForeColor="#500000" />
<ItemStyle HorizontalAlign="Center" Width="40px" />
</asp:TemplateField>
</Columns>
<SelectedRowStyle BackColor="#CBCA99" ForeColor="#500000" />
</asp:GridView>
<asp:Label ID="myFooterMessage" runat="server" ForeColor="#500000"></asp:Label>
</td>
<td>
<asp:SqlDataSource ID="SelectIngredientsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:TekComConnection %>"
SelectCommand="SELECT [INGREDIENT_NAME], [QUANTITY], [QUANTITY_FRACTION], [UNIT_OF_MEASURE] FROM [TB_INGREDIENTS] WHERE ([RECIPE_ID] = @RECIPE_ID) ORDER BY INGREDIENT_NAME">
<SelectParameters>
<asp:Parameter Name="RECIPE_ID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<cc1:RoundedCornersExtender ID="RoundedCornersExtender3" runat="server" Color="29, 51, 98"
Radius="10" TargetControlID="IngredientsforRecipe">
</cc1:RoundedCornersExtender>
<asp:GridView ID="IngredientsforRecipe" runat="server" AutoGenerateColumns="False"
DataSourceID="SelectIngredientsDataSource" ForeColor="#1D3362" AllowSorting="True"
Visible="false" BorderStyle="None">
<Columns>
<asp:BoundField DataField="QUANTITY" HeaderText="Qty" SortExpression="QUANTITY">
<HeaderStyle ForeColor="#500000" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="QUANTITY_FRACTION" HeaderText="Qty Fraction" SortExpression="QUANTITY_FRACTION">
<HeaderStyle ForeColor="#500000" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="UNIT_OF_MEASURE" HeaderText="Unit of Measure" SortExpression="UNIT_OF_MEASURE">
<HeaderStyle ForeColor="#500000" />
</asp:BoundField>
<asp:BoundField DataField="INGREDIENT_NAME" HeaderText="Ingredient" SortExpression="INGREDIENT_NAME">
<HeaderStyle ForeColor="#500000" />
</asp:BoundField>
</Columns>
</asp:GridView>
</td>
<td>
<asp:SqlDataSource ID="GetRecipeStepsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:TekComConnection %>"
SelectCommand="SELECT [RECIPE_STEP_ID], [STEP_NUMBER], [STEP_DESC] FROM [TB_RECIPE_STEPS] WHERE ([RECIPE_ID] = @RECIPE_ID) ORDER BY [RECIPE_STEP_ID]">
<SelectParameters>
<asp:Parameter Name="RECIPE_ID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<cc1:RoundedCornersExtender ID="RoundedCornersExtender4" runat="server" Color="29, 51, 98"
Radius="10" TargetControlID="StepsforRecipe">
</cc1:RoundedCornersExtender>
<asp:GridView ID="StepsforRecipe" runat="server" AllowSorting="True" AutoGenerateColumns="False"
ForeColor="#1D3362" DataSourceID="GetRecipeStepsDataSource" Visible="false" BorderStyle="None">
<Columns>
<asp:BoundField DataField="STEP_NUMBER" HeaderText="Step No." SortExpression="STEP_NUMBER">
<HeaderStyle ForeColor="#500000" />
<ItemStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="STEP_DESC" HeaderText="Description" SortExpression="STEP_DESC">
<HeaderStyle ForeColor="#500000" />
</asp:BoundField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>
<br />
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ActionButtons" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="AddSteps" runat="Server">
</asp:Content>