exam questions

Exam 70-486 All Questions

View all questions & answers for the 70-486 exam

Exam 70-486 topic 1 question 2 discussion

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

DRAG DROP -
You are developing an ASP.NET MVC web application in Visual Studio 2012.
The application has a model named ReservationLocation that contains properties named City and State.
The view that displays reservations has a single text box named loc for entering the location information. The location is entered as city, state.
There are action methods that have ReservationLocation as a parameter type.
You need to ensure that the City and State properties are correctly populated.
How should you implement model binding for the ReservationLocation type? (To answer, drag the appropriate code segment to the correct location or locations.
Each code 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:

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
apostolin
Highly Voted 5 years, 10 months ago
The correct answer is: var raw=binding.Context.ValueProvider.GetValue(“loc”); dynamic data=raw.RawValue.ToString().Slit(‘,’):
upvoted 8 times
...
hungry_ape9000
Most Recent 5 years, 2 months ago
FINAL ANSWER: Box #2 & Box #4 are correct
upvoted 3 times
...
CipherNird
5 years, 5 months ago
I got error using the answers and I tried below, var raw = bindingContext.ValueProvider.GetValue("loc").AttemptedValue; dynamic data = raw.Split(',');
upvoted 2 times
...
advenios
5 years, 7 months ago
I guess "Split" is the correct method name, not "Slit" :-)
upvoted 2 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 ...