提交表单post到hub

本文关键字:hub post 表单 提交 | 更新日期: 2023-09-27 18:06:28

我有这个表单(我把代码放在下面),我需要添加一个按钮,通过POST提交表单到hubspot的url,任何想法请…

@model OxfordEconomics.Users.ViewModels.CreateTrialUserHubspotViewModel
@using OxfordEconomics.Users.ViewModels;
 @using (Html.BeginFormAntiForgeryPost(Url.Action("FreeTrialForm","FreeTrial", new { area = "OxfordEconomics.Users" }))) {
 <div>
             <div class="span12">
                <h1>@T("Free trial registration form")</h1>
                <p>@T("Please fill out the form below to request a free    trial, or ") <a href="/about-us/sales-and-service/inquiries">@T("contact a    service representative")</a>. </p>
                <p class="required-fields"><i class="icon-exclamation-sign red-icon"></i>: Required fields</p>
            </div>
            <fieldset>
                <div>
                    @Html.LabelFor(model => model.FirstName)
                </div>
                <div>
                    @Html.EditorFor(model => model.FirstName)
                    <i class="icon-exclamation-sign red-icon" title="Required field"></i>
                </div>
                <div>
                    @Html.LabelFor(model => model.LastName)
                </div>
                <div>
                    @Html.EditorFor(model => model.LastName)
                    <i class="icon-exclamation-sign red-icon"    title="Required field"></i>
                </div>
        <div class="row">
            <div class="span8 offset1">
                <button type="submit" name="submit.Filter"      value="@T("Filter")">@T("Apply")</button>
            </div>
        </div>
    </fieldset>
</div>

}

提交表单post到hub

使用普通表单标签代替防伪助手调用。