How many Directives r in ASP.NET?

Answer Posted / ashish tiwari

There r 11 types directives in asp.net,

1)@ Assembly
Links an assembly to the current page or user control
declaratively.

2)@ Control
Defines control-specific attributes used by the ASP.NET
page parser and compiler and can be included only in .ascx
files (user controls).

3)@ Implements
Indicates that a page or user control implements a
specified .NET Framework interface declaratively.

4)@ Import
Imports a namespace into a page or user control explicitly.

5)@ Master
Identifies a page as a master page and defines attributes
used by the ASP.NET page parser and compiler and can be
included only in .master files.

6)@ MasterType
Defines the class or virtual path used to type the Master
property of a page.

7)@ OutputCache
Controls the output caching policies of a page or user
control declaratively.

8)@ Page
Defines page-specific attributes used by the ASP.NET page
parser and compiler and can be included only in .aspx files.

9)@ PreviousPageType
Creates a strongly typed reference to the source page from
the target of a cross-page posting.

10)@ Reference
Links a page, user control, or COM control to the current
page or user control declaratively.

11)@ Register
Associates aliases with namespaces and classes, which
allow user controls and custom server controls to be
rendered when included in a requested page or user control

Is This Answer Correct ?    37 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Web API uses which library for JSON serialization?

783


What do you mean by serialize and marshalbyref?

777


Can we override the enablepartialrendering property of the scriptmanager class?

896


Can we create a multiple user simultaneously ?

823


How can we identify that the page is post back in asp net?

692


In which event are the controls fully loaded?

772


What is web configuration file and how to use in web application

793


How does asp net store session ids by default?

732


What are the advantages of asp.net mvc framework? : asp.net mvc

769


Explain the reason why the javascript validation not run on the asp.net button but run successfully on the html button?

817


How can we make sure that Web API returns JSON data only?

782


What is difference between viewstate and session in asp net?

785


Where are session variables stored?

741


How you can return View from ASP.NET Web API method?

790


What is query string in asp.net?

789