What is the use of Keep and Peek in ASP.NET MVC TempData? | ASP.NET MVC Interview Question

IN ASP.NET MVC, Once TempData is read in the current request it will not be available in the subsequent requests. In order to make TempData in ASP.NET MVC to be read and also available......

Read More

Explain the Scope of TempData in ASP.NET MVC? | ASP.NET MVC Interview Question

TempData in ASP.NET MVC is available for the current request and in the subsequent request it’s available depending on whether TempData is read or not. So if ASP.NET MVC TempData......

Read More

What is the difference between HTML.TextBox vs HTML.TextBoxFor | ASP.NET MVC Interview Question

Both of them provide the same HTML output. However,  HTML.TextBoxFor is strongly typed while HTML.TextBox is not. Below is a simple HTML code which just creates a simple textbox......

Read More

What are HTML helpers in ASP.NET MVC? | ASP.NET MVC Interview Question

HTML helpers help you to render HTML controls in the view. For instance if you want to display a HTML textbox on the view, below is the HTML helper code. <%= Html.TextBox("LastName")......

Read More

Explain ASP.NET MVC Application Life Cycle? | ASP.NET MVC Interview Question

Any web application has two main execution steps first understanding the request and depending on the type of the request sending out appropriate response. ASP.NET MVC application......

Read More

Brief the Pros and Cons of ASP.NET MVC Razor View Engine? | ASP.NET MVC Interview Question

Pros: Compact, Expressive, and Fluid Easy to Learn Is not a new language Has great Intellisense Unit Testable Ubiquitous, ships with ASP.NET MVC Cons: Creates a slightly different......

Read More

Brief the Pros and Cons of ASP.NET MVC WebForm or ASPX View Engine? | ASP.NET MVC Interview Question

A view engine that is used to render a Web Forms page to the response. Pros: ubiquitous since it ships with ASP.NET MVC familiar experience for ASP.NET developers IntelliSense can......

Read More

What are Different Engines Avaible in ASP.NET MVC? | ASP.NET MVC Interview Question

View Engine is to provide an optimized syntax for HTML generation using a code-focused templating approach, Generally a view engine is parser for your code. There are two type of......

Read More

What are Bundling & Minification features in ASP.NET MVC 4? | ASP.NET MVC Interview Question

Bundling & Minification feature is introduced in MVC 4. Bundling & Minification reduces number of HTTP requests. Bundling & Minification combines individual files......

Read More

What’s New in ASP.NET MVC 4 Mobile Template? | ASP.NET MVC Interview Question

Smart Phones & tablets touch got smart by using new jQuery.Mobile.MVC NuGet package.  The jQuery.Mobile.MVC NuGet Package for tablets and smart phones helps you to achieve......

Read More

What is Routing in ASP.NET MVC? | ASP.NET MVC Interview Question | ASP.NET MVC Programmer Guide

, ,

In case of a typical ASP.NET application, incoming requests are mapped to physical files such as .aspx file. ASP.NET MVC framework uses friendly URLs that more easily describe user’s......

Read More

How to Specifying that a Parameter is Optional in MVC Attribute Routing? | ASP.Net MVC Interview Question

, ,

You can do it by Specifying that a parameter is Optional (via the '?' modifier). This should be done after inline constraints. Well,it's like this  [Route("Pet/{message:maxlength(4)?}")]  ......

Read More

How to Apply Multiple constraints to a Parameter in MVC Attribute Routing? | ASP.Net MVC Interview Question

, ,

You can apply multiple constraints to a parameter, separated by a colon. Well,It's like this  [Route("Pet/{petId:int:min(1)}")]  PetController.cs ......

Read More

How to set Route Constraints ? | ASP.Net MVC Interview Question

, ,

It allows you to restrict the parameters in the route template are matched The syntax is {parameter:constraint}      PetController.cs   ......

Read More

Advantages of Attribute Routing Over the Convention-based Routing | ASP.NET MVC Interview Question

, ,

Attribute Routing gives you more control over the URIs in your web application Easy to Troubleshoot issues No fear of modifying anything will break another......

Read More

How to Assign Names to Routes? | ASP.Net MVC Interview Question

, ,

Specify a Name for a Route By using that Name, you can easily allow URI generation for it Well,It's like this : [Route("Booking", Name = "Payments")]   BookingController.cs public class BookingController : Controller    ......

Read More

How to override Default Route ? | ASP.Net MVC Interview Question

, ,

Use specific [Route] on a specific Action. It'll override the default settings on the Controller.        BookingController.cs  ......

Read More

How to use Default Route ? | ASP.Net MVC Interview Question

, ,

You can apply the [Route] attribute on the Controller level and put the Action as a parameter That Route will then be applied on all Actions in......

Read More

How to Override the Common Route Prefix? | ASP.Net MVC Interview Question

, ,

You can use a tilde (~) on the method attribute to override the route prefix Well,It's like this : [Route("~/PetBooking")]          ......

Read More

How to Set Common Route Prefix? | ASP.Net MVC Interview Question

, ,

If you want, you can specify a common prefix for an entire controller To that you can use [RoutePrefix] attribute It's like this : [RoutePrefix("Booking")]  ......

Read More