Modal not showing up when show is called, also error on loading page. Attaching code below, can anyone help me discover my syntax / logic issues here?
NOTE: Did some research on this before posting, some claimed it can be an issue of where the modal is placed on the page in relation to the update panel I am using. I have tried different placements of the modal extender and I also tried removing the update panel all together in hopes to at least see the modal show, no go...same issue. So with that, the issue shouldnt be around the use of the update panel...
Any help is greatly appreciated!!! :)
Here is the error:
icrosoft JScript runtime error: Sys.ArgumentNullException: Value cannot be null.
Parameter name: elements
and the code...
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Delete.aspx.vb" Inherits="CATS.Delete" MasterPageFile="~/MasterPage/CatsMaster.Master" %>
<%@ Register TagName="Delete" TagPrefix="ctrlDel" Src="~/Controls/Delete.ascx" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajx" %>
<%--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
--%>
<asp:Content ID="content" ContentPlaceHolderID="Main" runat="server">
<asp:UpdatePanel ID="DeletePgUpdate" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<ajx:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</ajx:ToolkitScriptManager>
<table style="height:350px;" border="5px">
<tr>
<td><ctrlDel:Delete ID="delCtrl" runat="server" /></td>
</tr>
<tr>
<td><asp:LinkButton ID="btnNext" runat="server" Text="Next"></asp:LinkButton></td>
</tr>
</table>
<!-- TODO: use small modal for delete -->
<asp:Panel ID="pnlModal" runat="server" Style="display:none">
<div id="delModal" runat="server" class="tableModal" visible="false">
<div style="padding:30px 0 0 1020px">
<asp:LinkButton id="btnClose" runat="server" CssClass="modalClose"></asp:LinkButton>
</div>
<div style="padding:0px 0px 0px 50px; overflow:auto; height:500px;">
<asp:ListView ID="modalLstView" runat="server">
<LayoutTemplate>
<table id="table" runat="server" border="4" cellpadding="1" frame="border">
<tr runat="server" id="delLayout">
<td><asp:Label ID="lblTagNum" runat="server" Text="<%$AppSettings:lblTagNum %>"></asp:Label></td>
</tr>
<tr id="itemPlaceholder" runat="server">
</tr>
</table>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td>
<asp:TextBox ID="txtTagNum" runat="server" TabIndex="10"></asp:TextBox>
</td>
</tr>
</ItemTemplate>
</asp:ListView>
</div>
</div>
</asp:Panel>
<asp:Button ID="btn" runat="server" style="display:none" />
<ajx:ModalPopupExtender ID="Modal" runat="server" PopupControlID="pnlModal" TargetControlID="btn"
CancelControlID="btnClose" BackgroundCssClass="modalBackground" DropShadow="true"></ajx:ModalPopupExtender>
<!-- BTN for submit, temp for wiring up controls, needs to be wrapped in modal -->
<asp:LinkButton ID="btnSubmit" runat="server" Text="Submit"></asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>