What should you do?

You are developing a Asp.net MVC 2 application
The following Customer class is rendered by the Html.DisplayForModel helper method. public class Customer
{
public string FirstName { get; set;}
public string LastName { get; set;}
public string EmailAddress { get; set;}
}
You create a partial view named Email.ascx in the Views/Shared/DisplayTemplates folder. Email.ascx performs custom formatting of e-mail addresses.
You need to ensure that the custom formatting is applied to only the EmailAddress property.
What should you do?
A. Rename Email.ascx to String.ascx.
B. Add the following attribute to the EmailAddress property.
[DataType(DataType.EmailAddress)]
C. Add the following attribute tot the EmailAddress property
[UIHint("Email")]
D. Rename Email.ascx to EmailAddress.ascx

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.