PrepAway - Latest Free Exam Questions & Answers

You need to ensure that the custom formatting is applied to only the EmailAddressproperty

You are developing a Asp.net MVC 2 application
The following Customerclass is rendered by the Html.DisplayForModelhelper 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.ascxin 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 EmailAddressproperty.
What should you do?

PrepAway - Latest Free Exam Questions & Answers

A.
Rename Email.ascxto String.ascx.

B.
Add the following attribute to the EmailAddressproperty.
[DataType(DataType.EmailAddress)]

C.
Add the following attribute tot the EmailAddress property
[UIHint(“Email”)]

D.
Rename Email.ascxto EmailAddress.ascx


Leave a Reply