Internet Programming by Murach ( asp.net Core MVC) QUIZ
The due date is Monday is Monday November 2 ,2021
1-Which of the following is a property of the ModelState property that you can use to check whether the model stores valid data?
IsCorrect
IsRequired
IsValidated
IsValid
2-When a view posts data, an action method can use the ______________ property of the controller class to check whether all values in the model are valid.
Model
ViewBag
ValidationModel
ModelState
3-Which of the following is a tag helper that displays validation messages?
asp-validation-messages
asp-validation-summary
asp-for
asp-message
4-Which of the following is NOT a common data attribute used for validation?
StringLength
Range
Password
Compare
5-Which data attribute can you use to indicate that a property in a model class must not be an empty value?
Required
NonNullable
NotNull
Range
6-To enable remote validation on the server, you can add the _____________ attribute to a property in the model class.
Remote
JsonResult
ValidationAttribute
AdditionalFields
7-One step in creating custom client-side validation is to add ______________ attributes.
data-val-*
data-context-*
data-new-*
data-test-*
8-What type of validation isnÂ’t essential but can reduce workload on the server and decrease the necessity of multiple round trips to the server?
client-side validation
database validation
query-based validation
server-side validation
9-To create a custom attribute for server-side validation, you should write a class that inherits the ____________ class.
ValidationAttribute
Newtonsoft.Json
ValidationContext
ValidityBase
Recent Comments