I have my Model as follows
public class Album {
public int Id {get;set;}
public int ArtistaId {get;set;}
}
public class Artista {
public int Id {get;set;}
}
And in my View, I use:
@Html.TextBoxFor(model => model.ArtistaId, new { @class = "form-control" })
Problem:
I wanted to use AutoComplete
, so it would fetch and set ArtistaId
.
However, since it is a " Id
", and when filling that TextBox
, it informs ValidationMessage
that the field only accepts numeric data