Extension Methods

Here is a list of the Extension Methods already implemented.

//HtmlBasicExtensions:
    Html.Literal<TModel>(this ModelViewHtmlHelper<TModel> html, string text = null, string id = null);
    Html.Literal<TModel>(this ModelViewHtmlHelper<TModel> html, Expression<Func<T, object>> expression, string id = null);
    Html.Image<TModel>(this ModelViewHtmlHelper<TModel> html, string source, string id = null);
    Html.Image<TModel>(this ModelViewHtmlHelper<TModel> html, Expression<Func<T, object>> expression, string id = null);
    Html.Button<TModel>(this ModelViewHtmlHelper<TModel> html, string caption, string id = null);
//HtmlBasicListExtensions:
    Html.ListItem<TModel>(this ModelViewHtmlHelper<TModel> html, object content = null, string id = null);
    Html.ListItem<TModel>(this ModelViewHtmlHelper<TModel> html, Expression<Func<T, object>> expression, string id = null);
    Html.OrderedList<TModel>(this ModelViewHtmlHelper<TModel> html, IEnumerable<string> items = null, string id = null);
    Html.OrderedList<TModel>(this ModelViewHtmlHelper<TModel> html, Expression<Func<T, object>> expression, string id = null);
    Html.UnorderedList<TModel>(this ModelViewHtmlHelper<TModel> html, IEnumerable<string> items = null, string id = null);
    Html.UnorderedList<TModel>(this ModelViewHtmlHelper<TModel> html, Expression<Func<T, object>> expression, string id = null);
//HtmlBasicLinkExtensions:
    Html.Link<TModel>(this ModelViewHtmlHelper<TModel> html, string content, string link);
    Html.ActionLink<TModel>(this ModelViewHtmlHelper<TModel> html, string content, string actionName, string controllerName = null, object routeValues = null);
    Html.RouteLink<TModel>(this ModelViewHtmlHelper<TModel> html, string content, string routeName, string protocol = null, string hostName = null, string fragment = null, object routeValues = null);
    Html.ImageLink<TModel>(this ModelViewHtmlHelper<TModel> html, string source, string link);
    Html.ActionImageLink<TModel>(this ModelViewHtmlHelper<TModel> html, string source, string actionName, string controllerName = null, object routeValues = null);
    Html.RouteImageLink<TModel>(this ModelViewHtmlHelper<TModel> html, string source, string routeName, string protocol = null, string hostName = null, string fragment = null, object routeValues = null);
//HtmlFormExtensions:
    Html.Form<TModel>(this ModelViewHtmlHelper<TModel> html, string formAction = null, FormMethod method = 1);
    Html.ActionForm<TModel>(this ModelViewHtmlHelper<TModel> html, string actionName, string controllerName = null, object routeValues = null, FormMethod method = 1);
    Html.RouteForm<TModel>(this ModelViewHtmlHelper<TModel> html, string routeName, object routeValues = null, FormMethod method = 1);

using(var form = Html.Form(/*...*/)) {
//FormActionExtensions:
    form.SubmitButton<TModel>(this ModelViewForm<TModel> form, string caption);
    form.SubmitImage<TModel>(this ModelViewForm<TModel> form, string source);
    form.SubmitLink<TModel>(this ModelViewForm<TModel> form, string caption);
    form.ResetButton<TModel>(this ModelViewForm<TModel> form, string caption);
    form.ResetImage<TModel>(this ModelViewForm<TModel> form, string source);
    form.ResetLink<TModel>(this ModelViewForm<TModel> form, string caption);
//FormInputExtensions:
    form.DisplayText<TModel>(this ModelViewForm<TModel> form, string memberName, string value = null, string id = null);
    form.DisplayText<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, object>> expression, string id = null);
    form.Hidden<TModel>(this ModelViewForm<TModel> form, string memberName, object value = null);
    form.Hidden<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, object>> expression);
    form.LabelFor<TModel>(this ModelViewForm<TModel> form, string memberName, string targetId = null, string id = null);
    form.LabelFor<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, object>> expression, string targetId = null, string id = null);
    form.Password<TModel>(this ModelViewForm<TModel> form, string memberName, string value = null, string id = null);
    form.Password<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, object>> expression, string id = null);
    form.TextArea<TModel>(this ModelViewForm<TModel> form, string memberName, string text = null, string id = null);
    form.TextArea<TModel>(this ModelViewForm<TModel> form, string memberName, IEnumerable<string> lines, string id = null);
    form.TextArea<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, string>> expression, string id = null);
    form.TextArea<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, IEnumerable<string>>> expression, string id = null);
    form.TextBox<TModel>(this ModelViewForm<TModel> form, string memberName, string value = null, string id = null);
    form.TextBox<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, object>> expression, string id = null);
    form.SingleCheckBox<TModel>(this ModelViewForm<TModel> form, string memberName, bool? isChecked = null, string id = null);
    form.SingleCheckBox<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, bool?>> expression, string id = null);
    form.File<TModel>(this ModelViewForm<TModel> form, string memberName, string value = null, string id = null);
    form.File<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, object>> expression, string id = null);
//FormSelectionExtensions:
    form.CheckBoxList<TModel>(this ModelViewForm<TModel> form, string memberName);
    form.CheckBoxList<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, object>> expression);
    form.ComboBox<TModel>(this ModelViewForm<TModel> form, string memberName);
    form.ComboBox<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, object>> expression);
    form.ListBox<TModel>(this ModelViewForm<TModel> form, string memberName);
    form.ListBox<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, object>> expression);
    form.RadioButtonSet<TModel>(this ModelViewForm<TModel> form, string memberName);
    form.RadioButtonSet<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, object>> expression);
//FormValidationExtensions:
    form.ValidationMessageFor<TModel>(this ModelViewForm<TModel> form, string targetId, string message = null);
    form.ValidationMessageFor<TModel>(this ModelViewForm<TModel> form, Expression<Func<T, object>> expression, string message = null);
    form.ValidationSummary<TModel>(this ModelViewForm<TModel> form, string message = null);
    form.ValidationSummary<TModel>(this ModelViewForm<TModel> form, string message = null);
}

//AjaxFormExtensions:
    Ajax.Form<TModel>(this ModelViewAjaxHelper<TModel> ajax, string formAction, AjaxOptions ajaxOptions = null, IDictionary<string, object> ajaxAttributes = null);
    Ajax.ActionForm<TModel>(this ModelViewAjaxHelper<TModel> ajax, string actionName = null, string controllerName = null, object routeValues = null, AjaxOptions ajaxOptions = null, IDictionary<string, object> ajaxAttributes = null);
    Ajax.RouteForm<TModel>(this ModelViewAjaxHelper<TModel> ajax, string routeName = null, object routeValues = null, AjaxOptions ajaxOptions = null, IDictionary<string, object> ajaxAttributes = null);
//AjaxLinkExtensions:
    Ajax.Link<TModel>(this ModelViewAjaxHelper<TModel> ajax, string content, string link, AjaxOptions ajaxOptions = null);
    Ajax.ActionLink<TModel>(this ModelViewAjaxHelper<TModel> ajax, string content, string actionName, string controllerName = null, object routeValues = null, AjaxOptions ajaxOptions = null);
    Ajax.RouteLink<TModel>(this ModelViewAjaxHelper<TModel> ajax, string content, string routeName, string protocol = null, string hostName = null, string fragment = null, object routeValues = null, AjaxOptions ajaxOptions = null);
    Ajax.ImageLink<TModel>(this ModelViewAjaxHelper<TModel> ajax, string source, string link, AjaxOptions ajaxOptions = null);
    Ajax.ActionImageLink<TModel>(this ModelViewAjaxHelper<TModel> ajax, string source, string actionName, string controllerName = null, object routeValues = null, AjaxOptions ajaxOptions = null);
    Ajax.RouteImageLink<TModel>(this ModelViewAjaxHelper<TModel> ajax, string source, string routeName, string protocol = null, string hostName = null, string fragment = null, object routeValues = null, AjaxOptions ajaxOptions = null);

//HtmlPartialExtensions:
    Html.Partial<TModel>(this ModelViewHtmlHelper<TModel> html, string partialViewName, object model = null, ViewDataDictionary viewData = null);
    Html.Action<TModel>(this ModelViewHtmlHelper<TModel> html, string actionName, string controllerName = null, object routeValues = null);

//HtmlGridExtensions:
    Html.Grid<TModel>(this ModelViewHtmlHelper<IEnumerable<TModel>> html, string keyName, object options = null);
    Html.Grid<TModel>(this ModelViewHtmlHelper<IEnumerable<TModel>> html, Expression<Func<T, object>> keySelector, object options = null);

Last edited Jul 29, 2010 at 10:54 AM by AndreVianna, version 7

Comments

No comments yet.