Combobox
Basic usage
value:
The Combobox can be used to select a value from the dropdown or manully enter the string value.
Combobox/Index.cshtml
@(Html.Awe().Combobox(new ComboboxOpt {
Name = "AllMealsCombo",
Value = "combo value",
Url = Url.Action("GetAllMeals", "Data")
}))
Content value
value:
By default when selecting an item from the dropdown the item's Content will be set in the textbox, and the Key will be set as value in the component's hidden value input,
we can set UseContentValue to use the item Content instead of the Key.
Combobox/Index.cshtml
@(Html.Awe().Combobox(new ComboboxOpt
{
Name = "ComboContentVal",
Url = Url.Action("GetMealsGroupedImg", "Data"),
UseContentValue = true
}.ImgItem()))
Comments