<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server"> <link href="Content/custom.css" rel="stylesheet" /> <link href="css/jquery-ui.css" rel="stylesheet" /> <script src="Scripts/jquery-1.10.2.js"></script> <script src="js/jquery-ui.js"></script> <script type="text/javascript"> function LoadList() { document.getElementById("<%=lbnic.ClientID %>").style.display = 'none'; var ds = null; ds = <%=listFilter %> $("#txt").autocomplete({ source: ds } }); } $(document).ready(function () { $('#txt').on('autocompletechange change', function () { var st = this.value; var res = st.split(" ")[1]; var rs = st.split(" ")[0]; if (res) { document.getElementById("<%=lbnic.ClientID %>").style.display = 'inline'; //$('#lbnic').html(this.value); document.getElementById("<%=lbnic.ClientID %>").innerHTML = res; document.getElementById("<%=namelb.ClientID%>").innerHTML = rs; document.getElementById("<%=HiddenField1.ClientID %>").value = res; } else document.getElementById("<%=HiddenField1.ClientID %>").value = 'none'; }); }); </script> <asp:HiddenField ID="HiddenField1" runat="server" /> <!--search--> <input type="text" id="txt" class="search-query form-control" placeholder="Search Patients" visible="false"/> <!--button to open popup--> <asp:Button ID="addnew" runat="server" Text="Add New Patient" CausesValidation="False" CssClass="btn btn-warning" ValidateRequestMode="Disabled" /> <!-- panel--> <asp:Panel ID="panelRegister" CssClass="modalPopup form-control" runat="server" Style="display:none;"> <asp:Label ID="niclb1" runat="server" Text="NIC"></asp:Label> <asp:TextBox ID="nic" CssClass="form-control" runat="server" CausesValidation="True"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please enter patient's NIC" ControlToValidate="nic" Display="Dynamic" ForeColor="red"></asp:RequiredFieldValidator> <asp:Button ID="create" runat="server" CssClass="btn btn-primary" Text="Create" OnClick="create_Click" /> <asp:Button ID="cancel" runat="server" CssClass="btn btn-default" Text="Cancel" CausesValidation="False" /> </asp:Panel> <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modalBackground" PopupControlID="panelRegister" OkControlID="cancel" TargetControlID="addnew"></ajaxToolkit:ModalPopupExtender> <asp:Label ID="sucess" runat="server" ForeColor="Green" Font-Bold="True"></asp:Label> <asp:Label ID="lbnic" runat="server"></asp:Label> <asp:label id="namelb" runat="server"></asp:label></td> <asp:LinkButton ID="access" runat="server" CssClass="btn btn-info btn-xs" OnClick="access_Click" PostBackUrl="~/patientAccount.aspx"><span class="glyphicon glyphicon-edit"></span>Access</asp:LinkButton> </asp:Content>
Quote:In user interface design, a modal window is a graphical control element subordinate to an application's main window which creates a mode where the main window can't be used. The modal window is a child window that requires users to interact with it before it can return to operating the parent application, thus preventing the workflow on the application main window. Modal windows are often called heavy windows or modal dialogs because the window is often used to display a dialog box.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)