I have a Visual Studio 2013 MVC Razor project that I am studying by walking through one of the examples on w3schools.com.

In the chapter on ASP.NET MVC Security, you will see the default file AccountModels.cs in the Models class with the following text for each of the Password fields:

    [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
    [Display(Name = "New password")]
    public string NewPassword { get; set; }

I am familiar with String.Format, where the parameters must start from 0 and increment up.

The 2nd parameter above, however, jumps to 2, and it does not appear to have enough parameters being passed to the string.

When learning a project, I do what I can to customize features (like string responses) to better enforce my learning.

What is going on here?

pictures rock

Related posts

Recent Viewed