Exam NET Developer 10 All QuestionsBrowse all questions from this exam
Question 35

With Sitecore MVC, how do you ensure a field cannot be edited when you use the field helper to render content?

    Correct Answer: B

    To ensure a field cannot be edited when using the field helper to render content in Sitecore MVC, you should use the DisableWebEdit option. This option effectively disables editing capabilities on the rendered field.

Discussion
AlexEthisysOption: B

Pretty sure the answer is B

PRAVF9CYOption: B

For Field Helper : Field Helper : Ans B @Html.Sitecore().Field("Field Name", new { DisableWebEdit = true }) For : Tag helpers : Ans C <div asp-for="@Model.Description" convert-new-lines="false"></div> Hence Answer is B

uma_foxOption: C

@Html.Sitecore().Field("FieldName", Model, new { editable = false })