{"id":603,"date":"2022-01-14T11:11:27","date_gmt":"2022-01-14T02:11:27","guid":{"rendered":"https:\/\/mvc.auctionpro.co.kr\/?page_id=603"},"modified":"2022-01-14T11:15:28","modified_gmt":"2022-01-14T02:15:28","slug":"partialview-diagram","status":"publish","type":"page","link":"https:\/\/mvc.auctionpro.co.kr\/?page_id=603","title":{"rendered":"PartialView  diagram"},"content":{"rendered":"<h3>Remark : PartialView\u00a0 sample diagram<\/h3>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-604 size-full\" src=\"https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2022\/01\/netcore_boostrap.png\" alt=\"\" width=\"681\" height=\"531\" srcset=\"https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2022\/01\/netcore_boostrap.png 681w, https:\/\/mvc.auctionpro.co.kr\/wp-content\/uploads\/2022\/01\/netcore_boostrap-300x234.png 300w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Index View (\uc911\ub7b5)<\/h3>\n<pre class=\"lang:c# decode:true\" title=\"index View\">\t&lt;div id=\"dialog\" class=\"modal\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\"&gt;\r\n\t\t&lt;!-- PartialView : RuleTest --&gt;\r\n\t&lt;\/div&gt;\r\n\r\n\t\t&lt;script type=\"text\/javascript\"&gt;\r\n\r\n\t\t\tfunction RuleTest(id) {\r\n\r\n\t\t\t\tvar Key = $(\"#\" + id).val();\r\n\r\n\t\t\t\t$.ajax({\r\n\t\t\t\t\ttype: \"POST\",\r\n\t\t\t\t\turl: \"\/Display\/Test\",\r\n\t\t\t\t\tdata: { AirFareDisplayRuleKey: Key },\r\n\t\t\t\t\t\/\/contentType: \"application\/html; charset=utf-8\",\r\n\t\t\t\t\tdataType: \"html\",\r\n\t\t\t\t\tsuccess: function (response) {\r\n\t\t\t\t\t\t$('#dialog').html(response);\r\n\t\t\t\t\t\t$('#dialog').modal('show'); \/\/bootstrap modal\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfailure: function (response) {\r\n\t\t\t\t\t\talert(response.responseText);\r\n\t\t\t\t\t},\r\n\t\t\t\t\terror: function (response) {\r\n\t\t\t\t\t\talert(response.responseText);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\t\/\/});\r\n\t\t&lt;\/script&gt;\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>Control (\uc911\ub7b5)<\/h3>\n<pre class=\"lang:c# decode:true\" title=\"Control Test\">[HttpPost]\r\n        public IActionResult Test(string AirFareDisplayRuleKey) \r\n        {\r\n            try\r\n            {\r\n                string sAirFareRules = \"test...\";\r\n\r\n                ViewData[\"AirFareRules\"] = sAirFareRules;\r\n\r\n            }\r\n            catch\r\n            { }\r\n\r\n            return PartialView(\"Test\");\r\n        }<\/pre>\n<h3>PartialView Test (\uc911\ub7b5)<\/h3>\n<pre class=\"lang:c# decode:true \" title=\"PartialView Test\">\t&lt;div class=\"modal-dialog modal-lg\" role=\"document\"&gt;\r\n\t\t&lt;div class=\"modal-content\"&gt;\r\n\t\t\t&lt;div class=\"modal-header\"&gt;\r\n\t\t\t\t&lt;button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"&gt;&lt;span aria-hidden=\"true\"&gt;&amp;times;&lt;\/span&gt;&lt;\/button&gt;\r\n\t\t\t\t&lt;h4 class=\"modal-title\" id=\"myModalLabel\"&gt; \ud14c\uc2a4\ud2b8&lt;\/h4&gt;\r\n\t\t\t&lt;\/div&gt;\r\n\t\t\t&lt;div class=\"modal-body\"&gt;\r\n\t\t\t\t&lt;table class=\"table table-bordered table-striped\"&gt;\r\n\t\t\t\t\t&lt;tbody&gt;\r\n\t\t\t\t\t\t&lt;tr&gt;\r\n\t\t\t\t\t\t\t&lt;th scope=\"row\" width=\"9%\"&gt;\uc6d0\ubcf8&lt;\/th&gt;\r\n\t\t\t\t\t\t\t&lt;td&gt;&lt;\/td&gt;\r\n\t\t\t\t\t\t&lt;\/tr&gt;\r\n\r\n\t\t\t\t\t\t&lt;tr&gt;\r\n\t\t\t\t\t\t\t&lt;th scope=\"row\"&gt;\ubc88\uc5ed&lt;\/th&gt;\r\n\t\t\t\t\t\t\t&lt;td class=\"font-weight-bold\" style=\"white-space:pre-line\"&gt;@Html.Raw(ViewData[\"AirFareRules\"])&lt;\/td&gt;\r\n\t\t\t\t\t\t&lt;\/tr&gt;\r\n\t\t\t\t\t&lt;\/tbody&gt;\r\n\r\n\t\t\t\t&lt;\/table&gt;\r\n\r\n\t\t\t&lt;\/div&gt;\r\n\t\t\t&lt;div class=\"modal-footer\"&gt;\r\n\t\t\t\t&lt;button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\"&gt;Close&lt;\/button&gt;\r\n\t\t\t&lt;\/div&gt;\r\n\t\t&lt;\/div&gt;\r\n\t&lt;\/div&gt;<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Remark : PartialView\u00a0 sample diagram &nbsp; &nbsp; Index View (\uc911\ub7b5) &lt;div id=&#8221;dialog&#8221; class=&#8221;modal&#8221; tabindex=&#8221;-1&#8243; role=&#8221;dialog&#8221; aria-labelledby=&#8221;myModalLabel&#8221;&gt; &lt;!&#8211; PartialView : RuleTest &#8211;&gt; &lt;\/div&gt; &lt;script type=&#8221;text\/javascript&#8221;&gt; function RuleTest(id) { var Key = $(&#8220;#&#8221; + id).val(); $.ajax({ type: &#8220;POST&#8221;, url: &#8220;\/Display\/Test&#8221;, data: { AirFareDisplayRuleKey: Key }, \/\/contentType: &#8220;application\/html; charset=utf-8&#8221;, dataType: &#8220;html&#8221;, success: function (response) { $(&#8216;#dialog&#8217;).html(response); $(&#8216;#dialog&#8217;).modal(&#8216;show&#8217;); \/\/bootstrap\u2026 <span class=\"read-more\"><a href=\"https:\/\/mvc.auctionpro.co.kr\/?page_id=603\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-603","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=603"}],"version-history":[{"count":3,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/603\/revisions"}],"predecessor-version":[{"id":608,"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/603\/revisions\/608"}],"wp:attachment":[{"href":"https:\/\/mvc.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}