I am currently working on an ASP.NET project where I need to incorporate choices into a popup window. The issue arises when I select the choices from the dropdown list in the popup window and click on the OK button to hide a panel and display a web form. However, after the first successful selection, when I click on the LnkBtnGet button again, the dropdownlist is visible but the button disappears. How can I troubleshoot and resolve this problem? Any help would be greatly appreciated.
Form Code
<div class="tools">
<asp:LinkButton ID="LnkBtnGet" runat="server" ForeColor="White" Font-Bold="True" Font-Size="Medium" Text="+Add" OnClick="LnkBtnGet_Click" />
</div>
Javascript code
<script type = "text/javascript">
function BlockUI(elementID) {
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_beginRequest(function () {
$("#" + elementID).block({
message: '<table align = "center"><tr><td>' +
'<img src="images/loadingAnim.gif"/></td></tr></table>',
css: {},
overlayCSS: {
backgroundColor: '#000000', opacity: 0.6
}
});
});
prm.add_endRequest(function () {
$("#" + elementID).unblock();
});
}
$(document).ready(function () {
BlockUI("<%=pnlAddEdit.ClientID %>");
$.blockUI.defaults.css = {};
});
function Hidepopup() {
$find("popup").hide();
return false;
}
Panel Code:
<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" style = "display:none">
<asp:DropDownList ID="DropDownList1" Width="180px" Height="40px" runat="server"></asp:DropDownList>
<asp:Button Width="150px" Height="40px" ID="Button2" runat="server" Text="OK" Visible="true" OnClick="Save"></asp:Button> </table>
`
Panel Code 2
<asp:LinkButton ID="LinkButton1" runat="server" ></asp:LinkButton><cc1:ModalPopupExtender ID="popup" runat="server" DropShadow="false" PopupControlID="pnlAddEdit" TargetControlID="lnkFake" BackgroundCssClass="modalBackground"></cc1:ModalPopupExtender>