ASP MVC Create Full URL in Controller

Menghasilkan full url di dalam Controller MVC

[code language=”csharp”]
string address = Request.Url.Scheme + "://" + HttpContext.Request.Url.Authority + Url.Action("Detail", "IncomingDocument", new { id = form.Id });
[/code]

Contoh hasilnya: http://localhost:3750/IncomingDocument/Detail/16

http://stackoverflow.com/questions/699782/creating-a-url-in-the-controller-net-mvc

Chandra Oemaryadi has written 244 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>