This code works in my local environments and in other production applications. However, this time when I click CourseTitleSearchButton, any values entered by the user are not retained and the text fields are blank.
<asp:Panel ID="CourseTitleSearchPanel" runat="server" Width="800px" CssClass="ModalWindow" style="display:none; text-align: center; margin:auto;"> <span style="color: Blue">Search for your Course Title, if it isn't found then click 'Cancel' to manually type in the Course Title.</span> <table width="100%" cellspacing="0" border="0"> <tr> <td style="width: 10%"> <b>Course ID</b> </td> <td style="width: 10%"> <asp:TextBox ID="CourseIdSearchTextBox" runat="server"/> </td> <td style="width: 10%"> <b>Title</b> </td> <td style="width: 40%"> <asp:TextBox ID="CourseTitleSearchTextBox" runat="server" Width="95%"/> </td> </td> <td style="width: 20%"> <b>CSWF-Scoped Only</b> </td> <td style="width: 10%"> <asp:CheckBox ID="CswfOnlyCheckBox" runat="server" Enabled="true" /> </td> </tr> <tr> <td colspan="8" align="center"> <asp:Button ID="CourseTitleSearchButton" runat="server" Text="Search" CssClass="bluebkg" OnClick="CourseTitleSearchButton_Click" UseSubmitBehavior="false" OnClientClick="CopyCourseTitleSearchValuesOutOfPopup();"/> </td> </tr> </table> <div id="CourseTitleGridViewHeaderDiv" runat="server" visible="False" style="background-color:#CECECE; width: 90%; margin:auto;"> <div> <div style="float: left"> <asp:Button ID="CourseTitlePrevLinkButton" runat="server" Text="<< Previous Page" onclick="CourseTitlePrevLinkButton_Click" CssClass="LinkButton" UseSubmitBehavior="false"/> </div> <div style="float: right"> <asp:Button ID="CourseTitleNextLinkButton" runat="server" Text="Next Page >>" onclick="CourseTitleNextLinkButton_Click" CssClass="LinkButton" UseSubmitBehavior="false"/> </div> </div>
<asp:DropDownList ID="CourseTitlePageDropDownList" runat="server" OnSelectedIndexChanged="CourseTitlePageDropDownList_SelectedIndexChanged" AutoPostBack="true"> <asp:ListItem Text="1"/> </asp:DropDownList>
<br /> <asp:Label ID="CourseTitleRecordCountLabel" runat="server"/>
<div style="text-align: left"> <asp:GridView ID="CourseTitleGridView" runat="server" DataKeyNames="course_id" AutoGenerateColumns="False" Width="90%" GridLines="None" EmptyDataText="No Course Titles Found"> <AlternatingRowStyle BackColor="#EDEBC8" /> <Columns> <asp:TemplateField HeaderText="Course ID"> <ItemTemplate> <div style="text-align:left"> <asp:Button ID="AddTitleButton" runat="server" CausesValidation="false" CommandArgument="<%# Container.DataItemIndex %>" Text='<%# Eval("cin")%>' OnClick="AddTitleButton_Click" CssClass="LinkButton" UseSubmitBehavior="false"/> </div> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Course Title"> <ItemTemplate> <asp:Label ID="CourseTitleLabel" runat="server" Text='<%# Eval("course_title")%>'></asp:Label> </ItemTemplate> </asp:TemplateField>
<asp:BoundField DataField="delivery_method" HeaderText="Training Method" HeaderStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="course_hours" HeaderText="Course Hours" HeaderStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="ceu" HeaderText="CEU" HeaderStyle-HorizontalAlign="Left" /> </Columns> <HeaderStyle BackColor="#CECECE" /> <RowStyle BackColor="White" /> </asp:GridView> </div>
<br /> <asp:Label ID="CourseTitlePageLabel" runat="server"/> </div>
<br /> <asp:Button ID="CourseTitleCancelButton" runat="server" Text="Cancel" onclick="CourseTitleCancelButton_Click" CssClass="bluebkg" UseSubmitBehavior="false"/> <br /> </asp:Panel>
<asp:ModalPopupExtender ID="CourseTitlePopupExtender" runat="server" DropShadow="True" PopupControlID="CourseTitleSearchPanel" BackgroundCssClass="modalBackground" TargetControlID="CourseTargetControlIDFakeButton"/>