I created a modal, which I will practically use in all forms of the system, but I do not know how to call this modal in forms. This is the code of my modal, the page calls Modal.aspx, and the modal is the #modalexclusao
<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="Modal.aspx.cs" Inherits="web_academia.Modal" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Dialog - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script><scriptsrc="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$(function() {
$("#modalexclusao").dialog();
});
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="server">
<div id="modalexclusao" title="Senha Exclusão">
<p>Senha Exclusão teste form</p>
</div>
</asp:Content>
How can I call it in the code-behind of another page?
I tried this way:
$(document).ready(function() {
$('#modalexclusao').modal({
url: 'Modal.aspx'
});
});
But the modal does not appear.