en
Feedback
.Net Interview Questions

.Net Interview Questions

Open in Telegram

.Net Interview Questions

Show more
The country is not specifiedTechnologies & Applications40 773
1 794
Subscribers
+124 hours
+207 days
+4930 days
Posts Archive
✅2⃣1⃣9⃣ How do you specify comments using razor syntax?

✅2⃣1⃣8⃣ What are the file extensions for razor views? 1. .cshtml - If the programming lanugaue is C# 2. .vbhtml - If the programming lanugaue is VB

Layout pages, can define sections, which can then be overriden by specific views making use of the layout. Defining and overriding sections is optional.

✅2⃣1⃣7⃣ What are sections?

To have a consistent look and feel when using razor views, we can make use of layout pages. Layout pages, reside in the shared folder, and are named as _Layout.cshtml

✅2⃣1⃣6⃣ When using aspx view engine, to have a consistent look and feel, across all pages of the application, we can make use of asp.net master pages. What is asp.net master pages equivalent, in razor views?

No, by default content emitted using a @ block is automatically HTML encoded to protect from cross site scripting (XSS) attacks.

✅2⃣1⃣5⃣ When using razor views, do you have to take any special steps to proctect your asp.net mvc application from cross site scripting (XSS) attacks?

1. Action Method 2. Controller 3. Application

✅2⃣1⃣4⃣ What are the levels at which filters can be applied in an asp.net mvc application?

Authorization filter

✅2⃣1⃣3⃣ Which filter executes first in an asp.net mvc application?

1. RequireHttpsAttribute 2. AuthorizeAttribute

✅2⃣1⃣2⃣ Give an example for Authorization filters in an asp.net mvc application?

1. Authorization filters 2. Action filters 3. Response filters 4. Exception filters

✅2️⃣1⃣1⃣ If I have multiple filters impleted, what is the order in which these filters get executed?

Action Filters allow us to add pre-action and post-action behavior to controller action methods.

✅2️⃣1⃣0⃣ What is the use of action filters in an MVC application?

1. A Physical File is Found that Matches the URL Pattern - This default behaviour can be overriden by setting the RouteExistingFiles property of the RouteCollection object to true. 2. Routing Is Explicitly Disabled for a URL Pattern - Use the RouteCollection.Ignore() method to prevent routing from handling certain requests

✅2️⃣0️⃣9⃣ Give 2 examples for scenarios when routing is not applied?