MVC

  Home  Applications Programs  MVC


“MVC frequently Asked Questions in various Model View Controller (MVC) job Interviews by interviewer. Get preparation of MVC job interview”



48 MVC Questions And Answers

23⟩ Is the following route definition a valid route definition?

{controller}{action}/{id}

No, the above definition is not a valid route definition, because there is no literal value or delimiter between the placeholders. Therefore, routing cannot determine where to separate the value for the controller placeholder from the value for the action placeholder.

 185 views

24⟩ What are the 3 things that are needed to specify a route?

1. URL Pattern - You can include placeholders in a URL pattern so that variable data can be passed to the request handler without requiring a query string.

2. Handler - The handler can be a physical file such as an .aspx file or a controller class.

3. Name for the Route - Name is optional.

 193 views

25⟩ What is the adavantage of using ASP.NET routing?

In an ASP.NET web application that does not make use of routing, an incoming browser request should map to a physical file. If the file does not exist, we get page not found error.

An ASP.NET web application that does make use of routing, makes use of URLs that do not have to map to specific files in a Web site. Because the URL does not have to map to a file, you can use URLs that are descriptive of the user's action and therefore are more easily understood by users.

 186 views

29⟩ What is the significance of ASP.NET routing?

ASP.NET MVC uses ASP.NET routing, to map incoming browser requests to controller action methods. ASP.NET Routing makes use of route table. Route table is created when your web application first starts. The route table is present in the Global.asax file.

 226 views