Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael 19 posts 39 karma points
    Aug 09, 2013 @ 14:47
    Michael
    0

    How to specify an absolute action path using BeginUmbracoForm in V6

    Hi All,

        Developing on my local machine using the Azure Emulator I'm using a form like so

     

    @using (Html.BeginUmbracoForm<Demo.Web.Controllers.ContactFormSurfaceController>("SendEmail","ContactFormSurface"))
    {
        @Html.EditorFor(x => Model)
      
        <input type="submit"/>
    }

    This generates a form like this which 404s. This doesn't happen in production however prevents me from debugging this functionality in dev.

    
    <form action="http://dev.www.acme.com.au:82/contact-us/" enctype="multipart/form-data" method="post">

    With the page displayed at http://dev.www.acme.com.au:81 , is there a way I can change the form action to point to a port of my choice ie. :81 ?

    In my digging I found this on stackoverflow which seems a good candidate for building an absolute path to an action. I'm not sure how to apply it for an umbraco form though , any ideas here appreciated.

    http://stackoverflow.com/questions/2005367/getting-full-url-of-action-in-asp-net-mvc

     

     

     

     

     

     

Please Sign in or register to post replies

Write your reply to:

Draft