Awesome Core and MVC Controls

Attributes demo

This view uses only EditorFor helpers, and parameters for the helpers are set using. AdditionalMetadata attribute can be used to set any property of the helper.

@using (Html.BeginForm())
@Html.EditorFor(o => o.Number)
@Html.EditorFor(o => o.ParentCategory)
@Html.EditorFor(o => o.Meal1)
@Html.EditorFor(o => o.Meal2)
@Html.EditorFor(o => o.MealCustomSearch)
@Html.EditorFor(o => o.SomeMeals)
@Html.EditorFor(o => o.SomeCategories)
@Html.EditorFor(o => o.MealAuto)
@Html.EditorFor(o => o.MealId)
@Html.EditorFor(o => o.Date)
<input type="submit" value="submit" class="awe-btn" />
public class AttributesDemoInput
[AweMeta("min", 30)]
[AweMeta("max", 100)]
public int? Number { get; set; }

[DisplayName("Parent category")]
[AweUrl(Action = "GetCategories", Controller = "Data")]
public int? ParentCategory { get; set; }

[DisplayName("Child meal")]
[AweUrl(Action = "GetMeals", Controller = "Data")]
[AweParent("ParentCategory", "categories")]
[AweParam("categories", 157)]
public int? Meal1 { get; set; }

[DisplayName("Child meal 2")]
[AweUrl(Action = "GetMeals", Controller = "Data")]
[AweParent("ParentCategory", "categories")]
public int? Meal2 { get; set; }

[DisplayName("Meal custom search")]
[Lookup(ClearButton = true, Title = "this is a lookup with custom search", CustomSearch = true)]
public int? MealCustomSearch { get; set; }

[DisplayName("Meals multi")]
[MultiLookup(ClearButton = true, Controller = "MealsMultiLookup", Title = "select some stuff")]
public IEnumerable<int> SomeMeals { get; set; }

[AweUrl(Action = "GetCategories", Controller = "Data")]
public IEnumerable<int> SomeCategories { get; set; }

public int? MealId { get; set; }

[Autocomplete(Controller = "MealAutocomplete", Prefix = "eg", MinLength = 2, Delay = 500, PropId = "MealId")]
[AweMeta("Placeholder", "try Ma...")]
public string MealAuto { get; set; }

[AweMeta("Placeholder", "please pick date")]
[AweMeta("ClearButton", true)]
public DateTime? Date { get; set; }


We use cookies to improve your online experience. By accessing this site, you agree to the use of cookies and other technologies to process your personal data (e.g. IP address) to enhance and personalise your experience across our websites. Additionally, third-party companies, may store cookies on your device and use similar technologies to collect and use certain information. For more information, refer to our privacy policy and cookie policy.