Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Coding/Programming Interviews:Active Template Library (ATL)ActiveXApplication DeveloperArtificial intelligenceAssemblyAssociate Software EngineerAWKAWTC ProgrammingC++ ProgrammingCGI PerlCGI ProgrammingCMMICobolCritical ReasoningData Structures TreesDCOM COMDelphiDTDE4XExtensible Stylesheet Language (XSL)FortranFull-Stack DeveloperHaskellHTML DOMILUIPhone DeveloperJasper Reports DeveloperJava DeveloperLisp ProgrammingLotus NotesMicrosoft Foundation Class (MFC)Mobile DeveloperMVC DeveloperNode.jsOOPPascalPerl ProgrammingPHPPHP DeveloperProgrammingProgramming AlgorithmsProgramming ConceptsPythonRubyRuby on RailsRuby on Rails DeveloperSenior Front End DeveloperSenior Software DeveloperSignature ProgramSOASocket ProgrammingSoftware Development EngineerSoftware engineeringSr. PHP ProgrammerStack And QueueSTLSwift DeveloperTCL (Tool Command Language)Team Leader Android DeveloperUMLUnity 2D Games DeveloperUnity 3D DeveloperUnity DeveloperVBA (Visual Basic for Applications)Visual Basic (VB)Visual C++Web DevelopmentWin32APIWindows ProgramingWordPress DevelopmentWSDLXFormsXHTMLXLinkXMLXPathXQueryXSL-FOXSLT
Copyright © 2018. All Rights Reserved
MVC Developer Interview Question:
Tell me different return types of a controller action method?
Submitted by: MuhammadThere are total nine return types we can use to return results from controller to view.
☛ ViewResult (View): This return type is used to return a webpage from an action method.
☛ PartialviewResult (Partialview): This return type is used to send a part of a view which will be rendered in another view.
☛ RedirectResult (Redirect): This return type is used to redirect to any other controller and action method depending on the URL.
☛ RedirectToRouteResult (RedirectToAction, RedirectToRoute): This return type is used when we want to redirect to any other action method.
☛ ContentResult (Content): This return type is used to return HTTP content type like text/plain as the result of the action.
☛ jsonResult (json): This return type is used when we want to return a JSON message.
☛ javascriptResult (javascript): This return type is used to return JavaScript code that will run in browser.
☛ FileResult (File): This return type is used to send binary output in response.
☛ EmptyResult: This return type is used to return nothing (void) in the result.
Submitted by: Muhammad
☛ ViewResult (View): This return type is used to return a webpage from an action method.
☛ PartialviewResult (Partialview): This return type is used to send a part of a view which will be rendered in another view.
☛ RedirectResult (Redirect): This return type is used to redirect to any other controller and action method depending on the URL.
☛ RedirectToRouteResult (RedirectToAction, RedirectToRoute): This return type is used when we want to redirect to any other action method.
☛ ContentResult (Content): This return type is used to return HTTP content type like text/plain as the result of the action.
☛ jsonResult (json): This return type is used when we want to return a JSON message.
☛ javascriptResult (javascript): This return type is used to return JavaScript code that will run in browser.
☛ FileResult (File): This return type is used to send binary output in response.
☛ EmptyResult: This return type is used to return nothing (void) in the result.
Submitted by: Muhammad
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.