Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Change or remove XForm action

$
0
0

When implementing Html.BeginXForm to drop in a form, our code is adding a custom action attribute in order for the form to work with our system. So it looks like this:

Html.BeginXForm(Model.Form, new { Action = Model.ActionUri, data_abide = "", @class = @captchaClass })

If I take out the custom "Action = Model.ActionUri" in the htmlAttributes object, our forms do not work. So I want to replace the auto generated action with our custom one so that the form only gets one action attribute.

Is there a way to do this, and how?


Viewing all articles
Browse latest Browse all 9076

Trending Articles