/// <summary> /// Initializes a new instance of the <see cref="T:Romontinka.Server.WebSite.Metadata.SimpleLookupAttribute"/> class. /// </summary> public AjaxComboBoxAttribute(string controller, string getItemsAction, bool firstIsNull) { _model = new AjaxComboBoxModel(); _model.Controller = controller; _model.GetItemsAction = getItemsAction; _model.FirstIsNull = firstIsNull; }
public static MvcHtmlString AjaxComboBox(this HtmlHelper html, AjaxComboBoxModel model) { if (string.IsNullOrWhiteSpace(model.GetItemsAction)) { model.GetItemsAction = GetItemsActionDefault; } //if if (string.IsNullOrWhiteSpace(model.Controller)) { model.Controller = model.Property; } //if return(html.Partial("AjaxComboBox", model)); }