{"id":1102,"date":"2012-10-04T05:24:27","date_gmt":"2012-10-04T05:24:27","guid":{"rendered":"http:\/\/nestor.nestasoft.fr\/?p=1102"},"modified":"2012-10-19T04:50:09","modified_gmt":"2012-10-19T04:50:09","slug":"asp-net-mvc-4-cinquime-partie-linspecteur-de-page","status":"publish","type":"post","link":"https:\/\/nestasoft.fr\/?p=1102","title":{"rendered":"ASP.NET MVC 4 [Cinqui&egrave;me partie] : L&rsquo;inspecteur de page"},"content":{"rendered":"<p><a href=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/ApresCreatyionAdherent.PNG\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\"  title=\"Inspecteur de page\" border=\"0\" alt=\"Vue2\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/ApresCreatyionAdherent.PNG\" width=\"600\" height=\"211\" \/><\/a><\/p>\n<ol>\n<li><font color=\"#4f81bd\"><a href=\"http:\/\/nestor.nestasoft.fr\/?p=1012\" target=\"_blank\"><strong> ASP.NET MVC 4 [Premi\u00e8re partie]&#160;&#160; : Introduction<\/strong><\/a><\/font> <\/li>\n<li><strong><font color=\"#4f81bd\"><a href=\"http:\/\/nestor.nestasoft.fr\/?p=1059\" target=\"_blank\">.NET MVC 4 [Deuxi\u00e8me partie]&#160; : Ajout d\u2019un model<\/a><\/font> <\/strong><\/li>\n<li><font color=\"#4f81bd\"><strong><a href=\"http:\/\/nestor.nestasoft.fr\/?p=1067\" target=\"_blank\">ASP.NET MVC 4 [Troisi\u00e8me partie]&#160; : Ajout d\u2019un contr\u00f4leur<\/a><\/strong><\/font> <\/li>\n<li><font color=\"#4f81bd\"><strong><a href=\"http:\/\/nestor.nestasoft.fr\/?p=1085\" target=\"_blank\">ASP.NET MVC 4 [Quatri\u00e8me partie] : Ajout d\u2019une vue<\/a><\/strong><\/font> <\/li>\n<li><font color=\"#4f81bd\"><strong>ASP.NET MVC 4 [Cinqui\u00e8me partie] : Page Inspector<\/strong><\/font> <\/li>\n<li><font color=\"#4f81bd\">ASP.NET MVC 4 [Sixi\u00e8me partie]&#160;&#160;&#160;&#160;&#160; : Razor ou ASPX<\/font> <\/li>\n<li><font color=\"#4f81bd\">ASP.NET MVC 4 [Septi\u00e8me partie]&#160;&#160; : Conclusion<\/font> <\/li>\n<\/ol>\n<p>Dans cette partie nous parlerons de l\u2019inspecteur de page.<\/p>\n<p>L&rsquo;inspecteur de page&#160; est l\u2019une des nouvelles fonctionnalit\u00e9s de Visual Studio 2012, qui&#160;&#160; affiche une page Web directement dans l&rsquo;IDE de Visual Studio. <\/p>\n<p>Il permet de modifier des propri\u00e9t\u00e9s CSS et des attributs des \u00e9l\u00e9ments DOM et de consulter les modifications r\u00e9percut\u00e9es imm\u00e9diatement dans le navigateur int\u00e9gr\u00e9. Les modifications faites ne sont pas persistantes et les fichiers sources d&rsquo;origine ne sont pas affect\u00e9s.<\/p>\n<p>Lorsque vous choisissez un \u00e9l\u00e9ment rendu, l&rsquo;inspecteur de page ouvre le fichier dans lequel le balisage a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 et met en surbrillance la source.<\/p>\n<p><!--more--><\/p>\n<p>Pour une mise en pratique, nous allons faire un click droit sur le fichier <strong>Create.cshtml<\/strong> qui se trouve dans notre solution, comme le montre l\u2019image ci-dessous.<\/p>\n<p>&#160;<\/p>\n<p><a href=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/PI1.PNG\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"Inspecteur de page\" border=\"0\" alt=\"Vue2\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/PI1.PNG\" width=\"600\" height=\"746\" \/><\/a><\/p>\n<p>  <\/p>\n<p><strong>Pr\u00e9sentation de l\u2019inspecteur de page<\/strong><\/p>\n<p><strong><\/strong><\/p>\n<p>L\u2019inspecteur de page est dock\u00e9 dans Visual Studio 2012 et se pr\u00e9sente sous cette forme : <\/p>\n<p><a href=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/PI2.PNG\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"Inspecteur de page\" border=\"0\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/PI2.PNG\" width=\"600\" height=\"611\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p><strong>Modification du mot \u201cCreate\/ en se servant de l\u2019inspecteur de page<\/strong><\/p>\n<p>En cliquant sur le bouton \u201cInspecter\u201d et en se positionnant sur le mot \u201cCreate\u201d, l\u2019inspecteur de page nous positionne dans le code HTML correspondant.<\/p>\n<p><a href=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/PI3.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"Inspecteur de page\" border=\"0\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/PI3.png\" width=\"600\" height=\"463\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p>Pour \u00e9diter le mot &quot;Create&quot; faire un doucle clic sur ce dernier dans le code HTML. <\/p>\n<p><a href=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/EditionDuMotCreate.PNG\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"Inspecteur de page\" border=\"0\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/EditionDuMotCreate.PNG\" width=\"478\" height=\"87\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p> En modifiant &quot;Create&quot; par &quot;Liste des adh\u00e9rents&quot;, voici ce que l&rsquo;on obtient :   <\/p>\n<p><a href=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/ApresValidationEnter.PNG\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"Inspecteur de page\" border=\"0\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/ApresValidationEnter.PNG\" width=\"600\" height=\"174\" \/><\/a><\/p>\n<p><strong><\/strong><\/p>\n<p><strong>Modification de la couleur<\/strong><\/p>\n<p> Nous allons modifier la couleur du texte suivant en vert en utilisant l&rsquo;inspecteur de page.   <\/p>\n<p>&#160;<\/p>\n<p><a href=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/ModififcationDuStyle.PNG\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"Inspecteur de page\" border=\"0\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/ModififcationDuStyle.PNG\" width=\"600\" height=\"184\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p>D\u00e9placer la souris au dessus des mots &quot;Liste des adh\u00e9rents&quot;, ensuite \u00e9diter la couleur correspondate dans la feuille de style CSS et taper &quot;green&quot;. <\/p>\n<p>&#160;<\/p>\n<p><a href=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/ModififcationDuStyle2.PNG\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"Inspecteur de page\" border=\"0\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/ModififcationDuStyle2.PNG\" width=\"421\" height=\"240\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p>Vous devez obtenir ceci : <\/p>\n<p><a href=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/ModififcationDuStyle3.PNG\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: 0px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"Inspecteur de page\" border=\"0\" src=\"http:\/\/nestor.nestasoft.fr\/wp-content\/uploads\/2012\/09\/ModififcationDuStyle3.PNG\" width=\"600\" height=\"319\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p>Ici s&rsquo;ach\u00e8ve la pr\u00e9sentation consacr\u00e9e \u00e0 l&rsquo;inspecteur de page. Il est \u00e0 noter que, Vous pouvez encore faire plusieurs choses avec l&rsquo;inspecteur de page. <\/p>\n<p>&#160;<\/p>\n<p>Be connected! <\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1102\" class=\"pvc_stats all  \" data-element-id=\"1102\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/nestasoft.fr\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>ASP.NET MVC 4 [Premi\u00e8re partie]&#160;&#160; : Introduction .NET MVC 4 [Deuxi\u00e8me partie]&#160; : Ajout d\u2019un model ASP.NET MVC 4 [Troisi\u00e8me partie]&#160; : Ajout d\u2019un contr\u00f4leur ASP.NET MVC 4 [Quatri\u00e8me partie] : Ajout d\u2019une vue ASP.NET MVC 4 [Cinqui\u00e8me partie] : Page Inspector ASP.NET MVC 4 [Sixi\u00e8me partie]&#160;&#160;&#160;&#160;&#160; : Razor ou ASPX ASP.NET MVC 4 [Septi\u00e8me [&hellip;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1102\" class=\"pvc_stats all  \" data-element-id=\"1102\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/nestasoft.fr\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":1157,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-1102","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/posts\/1102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1102"}],"version-history":[{"count":7,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/posts\/1102\/revisions"}],"predecessor-version":[{"id":1119,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/posts\/1102\/revisions\/1119"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=\/wp\/v2\/media\/1157"}],"wp:attachment":[{"href":"https:\/\/nestasoft.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nestasoft.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}