I have the following dropdown menu:
public class object {
public other_object apple {get; set;}
...
public string stuff {get; set;}
...
}
public class other_object {
public string id {get; set;}
public string name {get; set;}
}
<select class="custom-select" @bind="@object.apple">
<option value="@object.apple">@object.apple.name</option>
...
</select>
I want to bind the select to an object, but only want to display some attribute of that object. This will give me the error:
System.InvalidOperationException: The type 'other_object' does not have an associated TypeConverter that supports conversion from a string. Apply 'TypeConverterAttribute' to the type to register a converter.
Is this possible to do? I'm not really sure how the type converter thing works.