I am a complete MVC newbie who has come up with 10 years of web forms. Here is the code I inherited:
namespace sample.Models
{
public class Pages
{
public int PageID { get; set; }
public string FolderName { get; set; }
}
}
How can I apply the trim function to the "set" part of this code? Right now this allows spaces at the end of the folder name, and I need to prevent this.
Ok, I included suggestions, however, spaces still remain.
Here is the UI / vs database. The user interface is trimmed correctly, but the full value with spaces is stored in the table:


source
share