Asp Net Mvc Interview Questions Infosys

How is a Managed code executed?

Managed code is a code whose execution is managed by Common Language Runtime. It gets the managed code and compiles it into machine code. After that, the code is executed. The runtime here CLR provides automatic memory management, type safety, etc.

ASP.NET is Microsoft corporations propitiatory frontend language. It means “Active Server Pages”. In the name itself, its saying Im active. The ASP code will run in the client machine and used to represent the data which is returning from the server.

1 What is the difference between Function and Stored procedure?

A procedure is used to perform certain task in order. A function can be called by a procedure. A function returns a value and control to calling function or code. A procedure returns the control but not any value to the calling function or code.

Explain some benefits of using MVC?

Some common benefits of MVC are:

  • Support of multiple views: Since there is a separation of the model from its view, the user interface (UI) gets the capability to implement multiple views of the same data concurrently.
  • Faster development process: MVC has the ability to provide rapid and parallel development. This means that while developing an application, it is more likely that one programmer will perform some action on the view and in parallel, another can work on creating the application’s business logic.
  • SEO-friendly development: The platform of MVC can support the SEO-friendly development of web pages or web applications.
  • More Control: The MVC framework (of ASP.NET) offers additional control over HTML, CSS and JavaScript than that of traditional WebForms.
  • Lightweight: MVC framework does not make use of View State which eventually minimises the requested bandwidth to some extent.
  • 1 What are the 3 important segments for routing?

    The 3 important segments for routing are:

    1 How will you define the 3 logical layers of MVC?

    The 3 logical layers of MVC can be defined as follows:

  • Model logic acts as a business layer.
  • View logic acts as a display layer.
  • Controller logic acts as input control.
  • 2 How will you differentiate between ActionResult and ViewResult?

    Some common differentiation between ActionResult and ViewResult is:

    ActionResult ViewResult
    It becomes effective if you want to derive different types of views dynamically. It is not so effective in deriving different types of views dynamically.
    It is an abstract class, meaning it has methods and variables without the implementation body of instruction. This has been derived from the ActionResult class.
    JsonResult, ViewResult, and FileStreamResult are some examples of its derived class. This class do not have its own derived class.

    The Spring MVC or Spring Web MVC can be defined as a framework that provides a “Model View Controller” (MVC) architecture in the application as well as ready components implemented for developing adjustable and adaptable web applications. It is actually a Java-based framework intended to build web applications. It works on the Model-View-Controller design approach. This framework also makes use of all the elementary traits of a core Spring Framework such as dependency injection, lightweight, integration with other frameworks, inversion of control, etc. Spring MVC has a dignified resolution for implementing MVC in Spring Framework with the use of DispatcherServlet.

    2 Which class will you use for sending the result back in JSON format in MVC?

    For sending back the result in JSON format in any MVC application, you have to implement the “JSONRESULT” class in your application.

    Infosys Technical interview question and answers for Asp.Net Developer

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *