bonjour tout le monde je galere juste pour affichier ma fenetre popup au demarrage d'une page jai suivit un tuto a la lettre mais jarrive toujours pas a afficher ma fenetre
je part a partir du layout(voir contenu)
Code asp.net : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 
<!DOCTYPE html>
<html lang="fr">
    <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <meta charset="utf-8" />
        <title>@ViewBag.Title - Mon application ASP.NET MVC</title>
        <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <meta name="viewport" content="width=device-width" />
        @Styles.Render("~/Content/css")
        <link href="~/Content/themes/base/jquery-ui.css" rel="stylesheet" />
        @Scripts.Render("~/bundles/jquery")
        <script src="~/Scripts/jquery-ui-1.8.24.min.js"></script>
        @Scripts.Render("~/bundles/modernizr")
        <script type="text/javascript">
            $(document).ready(function () {
                alert('ok');
         $("#dialog-modal").dialog({
             height: 355,
             width: 400,
             show: { effect: 'drop', direction: "up" },
             modal: true
            });
 
            });
    </script>
    </head>
    <body>
        <header>
            <div class="content-wrapper">
                <div class="float-left">
                    <p class="site-title">@Html.ActionLink("votre logo ici", "Index", "Home")</p>
                </div>
                <div class="float-right">
                    <section id="login">
                        @Html.Partial("_LoginPartial")
                    </section>
                    <nav>
                        <ul id="menu">
                            <li>@Html.ActionLink("Accueil", "Index", "Home")</li>
                            <li>@Html.ActionLink("À propos de", "About", "Home")</li>
                            <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
                        </ul>
                    </nav>
                </div>
            </div>
        </header>
        <div id="body">
            @RenderSection("featured", required: false)
            <section class="content-wrapper main-content clear-fix">
                @RenderBody()
            </section>
        </div>
        <footer>
            <div class="content-wrapper">
                <div class="float-left">
                    <p>&copy; @DateTime.Now.Year - Mon application ASP.NET MVC</p>
                </div>
            </div>
        </footer>
 
        @Scripts.Render("~/bundles/jquery")
        @RenderSection("scripts", required: false)
    </body>
</html>

voici ma vue(elle affiche juste la liste des produit)
Code asp.net : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
@model IEnumerable<MvcAjaxPOP.Models.customer>
 
@{
    ViewBag.Title = "ListCustomer";
    //Layout = "~/Views/Shared/_Layout.cshtml";
}
<div id="dialog-modal" title="le title du dialog">
    <p> this is a test popu</p>
</div>
<h2>ListCustomer</h2>
 
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.c_name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.c_address)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.c_mobile)
        </th>
        <th></th>
    </tr>
 
@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.c_name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.c_address)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.c_mobile)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.c_id }) |
            @Html.ActionLink("Details", "Details", new { id=item.c_id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.c_id })
        </td>
    </tr>
}
 
</table>

pour finir voici le controleur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 
 public ActionResult ListCustomer()
        {
            MvcAjaxPOP.Models.DataClasses1DataContext dc = new Models.DataClasses1DataContext();
            return View(dc.customer.ToList());
        }
lorsque je fait une alerte je vois tres bien le message au chargement de la page (c'est bizzard quil charge pas mon popup)du genre

Code asp.net : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
 
<script type="text/javascript">
            $(document).ready(function () {
            alert("ok");
         $("#dialog-modal").dialog({
             height: 355,
             width: 400,
             show: { effect: 'drop', direction: "up" },
             modal: true
            });
 
            });
    </script>
NB : tous les fichiers appelés dans le layout sont belle et bien dans leur emplacement
Merci une aide sera la bienvenue