﻿
{"id":1119,"date":"2012-12-15T14:33:10","date_gmt":"2012-12-15T14:33:10","guid":{"rendered":"http:\/\/www.gencayyildiz.com\/blog\/?p=1119"},"modified":"2019-02-08T21:22:00","modified_gmt":"2019-02-08T21:22:00","slug":"mvc-url-action-metodu","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/mvc-url-action-metodu\/","title":{"rendered":"MVC Url.Action Metodu"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>\u00d6nceki yaz\u0131lar\u0131mdan, MVC Html.Actionlink Metodu ba\u015fl\u0131kl\u0131 konumuzda Html.ActionLink metodundan ve bu metodun linkleri olu\u015fturmak i\u00e7in kullan\u0131ld\u0131\u011f\u0131ndan bahsetmi\u015ftik.Bu metoda alternatif olabilecek ama link olu\u015fturmaktan ziyade, sadece adres \u00fcretebilecek URL.Action metoduna de\u011finece\u011fiz.<br \/>\n<!--more--><\/p>\n<p>Yukar\u0131da az \u00e7ok teorik bilgi verildi, konumuza pratik olarak devam edelim.<\/p>\n<p>A\u015fa\u011f\u0131daki yap\u0131 an\u0131msaman\u0131z a\u00e7\u0131s\u0131ndan Html.ActionLink metoduna \u00f6rnektir.<br \/>\n<span style=\"font-size: x-small; color: #003300;\"><strong><em>&lt;%: Html.ActionLink(&#8220;Link Ad\u0131&#8221;,&#8221;Action Ad\u0131&#8221;,&#8221;Controller Ad\u0131&#8221;) %&gt;<\/em><\/strong><\/span><\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n&lt;%: Html.ActionLink(&quot;Ben&quot;, &quot;Ben&quot;, &quot;Home&quot;)%&gt;\r\n<\/pre>\n<p>\u00dcstteki yap\u0131 sayesinde, &#8220;Home(Controller)&#8221; ismindeki Controller s\u0131n\u0131f\u0131m\u0131zda bulunan &#8220;Ben&#8221; isimli ActionResult tipli metodu \u00e7al\u0131\u015ft\u0131r\u0131l\u0131yor.Link yap\u0131s\u0131da a\u015fa\u011f\u0131daki resimdeki gibi oluyor.<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/12\/link.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1122\" title=\"link\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2012\/12\/link.png\" alt=\"\" width=\"184\" height=\"20\" \/><\/a><\/p>\n<p>\u015eimdi de URL.Action metodu i\u00e7in \u00f6rnek yapal\u0131m.<br \/>\n<span style=\"font-size: x-small; color: #003300;\"><strong><em>&lt;a href='&lt;%: Url.Action(&#8220;Action Ad\u0131&#8221;,&#8221;Controller Ad\u0131&#8221;) %&gt;&#8217;&gt;Link Ad\u0131&lt;\/a&gt;<\/em><\/strong><\/span><\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n&lt;a href=&quot;&lt;%: Url.Action(&quot;Ben&quot;,&quot;Home&quot;) %&gt;&quot;&gt;Ben Kimim ?&lt;\/a&gt;\r\n<\/pre>\n<p>Url.Action metodunda ise, &#8220;Home(Controller)&#8221; ismindeki Controller s\u0131n\u0131f\u0131m\u0131zda bulunan &#8220;Ben&#8221; isimli ActionResult tipindeki metodu \u00e7al\u0131\u015ft\u0131r\u0131p, html deki &lt;a..&gt;&lt;\/a&gt; etiketinin &#8220;href&#8221; attribute una adres yolunu veriyor.Link yap\u0131s\u0131n\u0131n Html.ActionLink&#8217;ten hi\u00e7 bir fark\u0131 yoktur.<\/p>\n<p>Konuyu \u00e7ok da\u011f\u0131tmadan tad\u0131nda b\u0131rakmak isterim.Umar\u0131m faydan\u0131za dokunur.<\/p>\n<p>\u0130yi \u00e7al\u0131\u015fmalar&#8230;<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>\u00d6nceki yaz\u0131lar\u0131mdan, MVC Html.Actionlink Metodu ba\u015fl\u0131kl\u0131 konumuzda Html.ActionLink metodundan ve bu metodun linkleri olu\u015fturmak i\u00e7in kullan\u0131ld\u0131\u011f\u0131ndan bahsetmi\u015ftik.Bu metoda alternatif olabilecek ama link olu\u015fturmaktan ziyade, sadece adres \u00fcretebilecek URL.Action metoduna de\u011finece\u011fiz.<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[746,308,309,283,307],"class_list":["post-1119","post","type-post","status-publish","format-standard","hentry","category-asp-net-mvc","tag-asp-net-mvc","tag-link","tag-link-olusturma","tag-mvc","tag-url-action"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/1119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/comments?post=1119"}],"version-history":[{"count":1,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/1119\/revisions"}],"predecessor-version":[{"id":10380,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/1119\/revisions\/10380"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=1119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=1119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=1119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}