0
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 the 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>
<script src="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 another page’s code-Behind ?
I tried this way:
$(document).ready(function() {
$('#modalexclusao').modal({
url: 'Modal.aspx'
});
});
But the modal does not appear.
Have you ever tried using @Renderpage("~/Views/Shared/Sampleview.cshtml") ? You just have to see how to play this on a conditional... But that’s the job of this guy...
– DiegoSantos
I use webforms @Diegosantos, updated the way I tried to do, but it doesn’t work properly.
– Mariana
Puts, I’m sorry missed attention. Let’s research
– DiegoSantos
All right @Diegosantos, I’m searching to see if I can find a solution.
– Mariana