2
I have a Textboxfor that lists the record of a table field. When displaying in the view, the textbox throws blank spaces after displaying the record content. I realized that these spaces are to complete the Stringlegth set in the model for maximum allowed character size for the textBoxFor
[Required(ErrorMessage = "Campo obrigatório")]
[Display(Name = "Responsável")]
[StringLength(80, ErrorMessage = "Informe no máximo 80 caracteres")]
public string Responsavel { get; set; }
In View I put the Textboxfor
@f.FormGroup().TextBoxFor(p => p.Responsavel).WidthMd(6).Placeholder("Professor responsável pelo projeto.")
And the field is listed as follows:
"João da Silva 'several blank spaces'" (without the quotation marks, I put the quotation marks to show that a blank space is being applied).
I got other forms I made the same way and it doesn’t happen, why the hell is this blank space included? Before anyone asks, the comic book record has no spaces.
Apparently vc is using some extensions in the helper
Html
. Not knowing what they do makes it hard to help. You can post their content?– Good Bye Blue sky
In BD the field is Char or Varchar?
– Alexandre Cavaloti