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

How to communicate via Remote proxy with Client? a)MarshalByRef b)Marshal by Value or Any thing else?

1817


Do gac'ed assemblies have fulltrust?

885


What is ispostback method in asp.net? Why do we use that?

887


Suppose You Want A Certain Asp.net Function Executed On Mouseover For A Certain Button. Where Do You Add An Event Handler?

900


Describe session handling in a webfarm, how does it work and what are the limits?

853


Is a dll file an executable?

770


How to display validation messages in one control?

786


What is session state server?

898


Less than one page, how many windows will you be able to maintain?

803


What are the file extensions for razor views?

914


How many types of server controls do we have?Also explain differance between them taking an example of ASP.NET?

2638


a web application needs to be created to accept the product name and quantity of a toy from a customer. After the customer has entered the product name the application needs to display the discounted price of the product to the customer (company is offering 35% discount on all products). The application should allow the customer to select the product name from a list box. and also while i'm data binding to a label with custom data binding with some declarations : "The Discounted Price is "+((System.Convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)) - ((System.convert.todouble(lblprodprice.text)*(system.convert.todouble(txtqty.text)*0.35)). Where i need to give this declaration in asp.net 2.0.

1656


To add a hyperlink column to the DataGrid which tag is used ?

806


What is the question mark in a url?

749


Explain the path instructions in xaml?

805