ASP.NET (Core) MVC Interview Questions

Want to become an expert in cracking ASP.NET (Core) MVC interview questions?

Start with practicing the questions below. Whether a question involves multiple choice or live coding, we will give you hints as you go and tell you if your answers are correct or incorrect.

After that, take our timed public ASP.NET (Core) MVC Interview Questions Test.

To use our service for testing candidates, buy a pack of candidates.


1. Action Attributes

ASP.NET (Core) MVC Actions Public

Which statements are true about action attributes in ASP.NET (Core) MVC?

(multiple correct answers possible)

Easy  
2min
   


2. Alphabet

ASP.NET (Core) MVC Razor Public

Select the code snippets that are valid in the Razor view engine, and when used, generate a paragraph containing the string: "ABCDEFGHIJKLMNOPQRSTUVWXYZ".

(multiple correct answers possible)

Easy  
2min
   


3. Passing Data

ASP.NET (Core) MVC MVC pattern Public

Select all the methods that can be used to pass data from the controller to the view.

(multiple correct answers possible)

Easy  
2min
   


4. User Routing

ASP.NET (Core) MVC Actions Routing Public New

Consider the following code sample:

public class UserController : Controller
{
    [Route("/user")]
    public IActionResult GetUser()
    {
        return Content("Ask for specific user on URL: /user/{userId}");
    }

    [Route("/user/{userId}")]
    public IActionResult GetUserById(string userId)
    {
        return Content($"User with id: {userId}");
    }
}

Select which of the following URLs that will be routed to the GetUserById method.

(multiple correct answers possible)

Easy 
3min
   


If you feel ready, take one of our timed public ASP.NET (Core) MVC Interview Questions tests:
  • ASP.NET (Core) MVC, HTML/CSS, JavaScript, C#, and SQL Online Test (Easy / Hard)
Not exactly what you are looking for? Go to our For Jobseekers section.