ASP.NET MVC 4 Flashcards
In asp.net mvc 4 what does Content() helper method return
Returns a ContentResult that renders arbitrary text, e.g., “Hello, world!”
In asp.net mvc 4 what does File() helper method return
Returns a FileResult that renders the contents of a file, e.g., a PDF.
In asp.net mvc 4 what does HttpNotFound() helper method return
Returns an HttpNotFoundResult that renders a 404 HTTP status code response.
In asp.net mvc 4 what does JavaScript():: helper method return
that renders JavaScript, e.g., “function hello() { alert(Hello, World!); }”.
In asp.net mvc 4 what does Json() helper method return
Returns a JsonResult that serializes an object and renders it in JavaScript Object
Notation (JSON) format, e.g., “{ “Message”: Hello, World! }”.
In asp.net mvc 4 what does PartialView() helper method return
Returns a PartialViewResult that renders only the content of a view (i.e., a view
without its layout).
In asp.net mvc 4 what does Redirect() helper method return
Returns a RedirectResult that renders a 302 (temporary) status code to redirect
the user to a given URL, e.g., “302 http://www.ebuy.com/auctions/recent”. This
method has a sibling, RedirectPermanent(), that also returns a RedirectResult, but
uses HTTP status code 301 to indicate a permanent redirect rather than a temporary
one.
In asp.net mvc 4 what does View() helper method return
Returns a ViewResult that renders a view.
When the ASP.NET MVC 4 Framework comes across a controller action
that returns a non-ActionResult type what does it do
automatically wraps the value
in a ContentResult and renders the value as raw content.
in asp.net where do you enable/disable client side validation and/or unobtrusive javascript
web.config,
in asp.net mvc 4 how can you include jscripts
@section scripts { … }
in asp.net mvc 4 what is the idea behind a front controller pattern
when an HTTP request is sent, a controller intercepts and processes it.
The controller is responsible for determining how to process the request and for sending
the result back to the client.
in asp.net mvc 4 what two engines are involved in processing an http request
routing and view
in asp.net mvc 4 what is the purpose of the action filter
security, caching, error handling
in asp.net most action methods return an instance of a class called what
ActionResult