【问题标题】:Helper using ajax helper BeginForm使用 ajax 助手 BeginForm 的助手
【发布时间】:2009-10-02 14:43:51
【问题描述】:

谁能说出为什么我在自定义助手中使用的 BeginForm 方法会在第一个文本框之前呈现此文本?

System.Web.Mvc.Html.MvcForm

它也有效! :) :(

我使用的代码如下:

// The helper signature
public static string Pagination(this HtmlHelper helper, int currentPage, int totalPages, string orderBy, string orderDirection, string listArea)

// Ajax helper declartion
AjaxHelper ajaxHelper = new AjaxHelper(helper.ViewContext, helper.ViewDataContainer);

// Form html generation
sb.Append(
            ajaxHelper.BeginForm(
                helper.ViewContext.RouteData.Values["action"].ToString(),
                new AjaxOptions { UpdateTargetId = listArea, LoadingElementId = "loading" }
            )
            + helper.TextBox("page")
            + helper.Hidden("orderBy", orderBy)
            + helper.Hidden("orderDirection", orderDirection)
            + "<input type=\"submit\" value=\"" + Localization.GetText("Go") + "\" /></form>"
        );

【问题讨论】:

    标签: ajaxform ajax-forms


    【解决方案1】:

    在开始表单标记中使用“

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-03-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多