Closed
Description
Will the Bind syntax allow us to bind to objects instead of just primitive types. It throws an error
"Error: System.ArgumentException: 'bind' does not accept values of type WebApplication1.Pages.Customer. To read and write this value type, wrap it in a property of type string with suitable getters and setters."
Here is my code
<select class="form-control" bind="SelectedCustomer">
@foreach(var item in Customers)
{
<option value="@item">@item.Name</option>
}
</select>