2.3.2 Question
Multiple Choice
You are creating an ASP.NET MVC web application. The application accepts phone number input through the application’s form. When viewing the source from a browser, you find the following code:
PhoneNumber: <input id="phoneNumber" name="phoneNumber" size="10" type="text" value="" />
What Razor syntax code segment was used?
-
A. PhoneNumber: <input id="phoneNumber" name="phoneNumber" size="10" type="text" value="3125551212" />
-
B. <div class="editor-field">
@Html.EditorFor(model => model.PhoneNumber)</div> -
C. PhoneNumber: @Html.TextBox("phoneNumber", Request["phoneNumber"], new { @placeholder = "3125551212" })
-
D. PhoneNumber: @Html.TextBox("phoneNumber", Request["phoneNumber"], new { size = 10 })