exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 102 discussion

Actual exam question from Microsoft's 70-486
Question #: 102
Topic #: 1
[All 70-486 Questions]

DRAG DROP -
You are developing an ASP.NET MVC web application.
You need to create a form that can be used to add new products to the web application.
You have the following markup:

Which markup segments should you include in Target 1, Target 2, Target 3 and Target 4 to complete the markup? To answer, drag the appropriate markup segments to the correct targets. Each markup segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Target 1: <form action="/Products/Create" method="post">
The form methods are post and get (not submit).
Target 2: <td>@Html.Textbox(@Model.ProductName)</td>
The InputExtensions.TextBox method returns a text input element. The TextBox method is designed to make it easy to bind to view data or model data.
Target3: <td>@Html.Textbox(@Model.UnitPrice)</td>
The InputExtensions.TextBox method returns a text input element. The TextBox method is designed to make it easy to bind to view data or model data.
Target 4: <input type="submit" value="Save"/>
The submitattribute, of input type, declares a submit button.
The input type attribute does not have a post attribute.
References:
https://weblogs.asp.net/scottgu/asp-net-mvc-preview-5-and-form-posting-scenarios https://msdn.microsoft.com/en-us/library/system.web.mvc.html.inputextensions.textbox(v=vs.118).aspx

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
hungry_ape9000
Highly Voted 5 years, 2 months ago
FINAL ANSWER: <form action="/Products/Create" method="post"> <td>@Html.Textbox(@Model.ProductName)</td> <td>@Html.Textbox(@Model.UnitPrice)</td> <input type="submit" value="Save"/>
upvoted 6 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...