PrepAway - Latest Free Exam Questions & Answers

You are developing an ASP.NET MVC application that enables you to edit and save a student object.

You are developing an ASP.NET MVC application that enables you to edit and save a student object.

The application must not retrieve student objects on an HTTP POST request.

You need to implement the controller.

Which code segment should you use? (Each correct answer presents a complete solution. Choose all that apply.)



A. Option A

B. Option B

C. Option C

D. Option D

Explanation:

C: This is the default MVC implementation of having separate methods for GET and POST via function overloading.

D: We retrieve the GET and POST methods through this.HttpContext.Request.RequestType.

Incorrect Answers:

A: We retrieve the GET and POST methods through this.HttpContext.Request.RequestType, not through this.HttpContext.Request[-ActionName-].

Reference: Examining the Details and Delete Methods

http://www.asp.net/mvc/overview/getting-started/introduction/examining-the-details-and-delete-methods


Leave a Reply