Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
31 views2 pages

Important Questions MVC

Uploaded by

AjayRathwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views2 pages

Important Questions MVC

Uploaded by

AjayRathwa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

------------------------------------------------------------ Attribute

-----------------------------------------------------------------------------------
--

[Authorize] Attribute:
Purpose: Restricts access to controllers or action methods to authenticated users.
Usage: [Authorize] or [Authorize(Roles = "Admin")]

[AllowAnonymous] Attribute:
Purpose: Allows unauthenticated users to access a controller or action method.
Usage: [AllowAnonymous]

[HttpGet] and [HttpPost] Attributes:


Purpose: Specifies the HTTP method that an action method will respond to.
Usage: [HttpGet] or [HttpPost]

[Route] Attribute:
Purpose: Defines a custom URL pattern for a controller or action method, allowing
you to override default routing.
Usage: [Route("custom-url")]

[ValidateAntiForgeryToken] Attribute:
Purpose: Prevents cross-site request forgery (CSRF) attacks by validating a unique
token in form submissions.
Usage: [ValidateAntiForgeryToken]

[OutputCache] Attribute:
Purpose: Caches the output of an action method to improve performance.
Usage: [OutputCache(Duration = 3600)]

[ChildActionOnly] Attribute:
Purpose: Specifies that an action method can only be called as a child action,
typically used in partial views.
Usage: [ChildActionOnly]

[ActionName] Attribute:
Purpose: Specifies a different action name for an action method.
Usage: [ActionName("CustomAction")]

[ValidateAntiForgeryToken] Attribute:
Purpose: Validates that the request includes a valid anti-forgery token.
Usage: [ValidateAntiForgeryToken]

[RequireHttps] Attribute:
Purpose: Requires that the request is made over HTTPS.
Usage: [RequireHttps] or [RequireHttps(Roles = "Admin")]

[HandleError] Attribute:
Purpose: Specifies how unhandled exceptions should be handled at the controller or
action level.
Usage: [HandleError]

[NoCache] Attribute:
Purpose: Prevents caching of the response by adding appropriate HTTP headers.
Usage: This is typically a custom attribute that you define.

------------------------------------------------------------ Attribute
-----------------------------------------------------------------------------------
--

------------------------------------------------------------- questions
-----------------------------------------------------------------------------------
-

How can we use two (multiple) models with a single view?


What is CSRF attack and how can we prevent the same in MVC?
Explain the methods used to render the views in asp. net MVC
How to use Jquery Plugins in MVC validation?
Can we add constraints to the route? If yes, explain how we can do it?
Filter and Filter overrides
Order of execution of filters
What is the use of web API? Why Web API needed, if you have already RESTful
services using WCF?
You are developing as asp. net MVC application. You need to authenticate clients by
using NT LAN Manager. Which authentication method you will implement?
Which validation provider is installed by default in asp. net MVC framework, which
provides client validation support for the built-in numeric data types such as int,
decimal, and float etc?
Output Caching

--------------------------------------------------------------- practis
-----------------------------------------------------------------------------------
---

https://dotnettutorials.net/course/csharp-dot-net-tutorials/

1.) .net framework — DOT NET Framework , CLR ,CTS , dot net program execution
flow , intermediate language , managed and unmanaged code , garbage
collector ,Assembly DLL EXE in .NET Framework , strong and weak assembly , app
domain.

2.) C# — basics , oops , exception handling , delegates , multithreading ,


collection framework and generic.

3.) SQL — basics ,keys , clauses , operator, joins , indexes ,built in function,
store procedure , difference between Store procedure and function,views , Trigger .

4.) Web api —introduction ,http Verb ( get ,post ,put ,delete) , calling web api
from jQuery, Routing , security , versioning

5.) Ado.net — introduction , Sqlconnection, Sqlconmand , sqldatareader ,


sqldataadapater, dataset, datatable , architecture of Ado.net

6.) Entity framework— basics , database first approach .

7.) Asp.net MVC— MVC , routing , html helper, attributes , data annotations, action
results , view ,filter , security.

Note — This are the main. Each and every topic contain sub topic . Kindly referred
link mentioned above. It helped me a lot. For notes you can contact with me.

You might also like