How many Directives r in ASP.NET?

Answers were Sorted based on User's Feedback



How many Directives r in ASP.NET?..

Answer / 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

How many Directives r in ASP.NET?..

Answer / rahultripathi

@assembly : - Link assembly to current Page or user control
directory .
@control :- Define control Spacific attributes to used
by ASP.Net page parser and compiler included only in .ascx
page.
@ Impliment : - Indicates that a page or user control
implements a specified .NET Framework interface
declaratively
@ import :- import a namespace in Page or user control
explicit.

@ 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

@ Master Type:- Defining class or vartual Path used to type
master page property of page.

@OutPut Cache.
@Page.
@Privious Page Type.
@Reference .
@Register

Rahul Tripathi
rahltripathi@myway.com

Is This Answer Correct ?    23 Yes 4 No

How many Directives r in ASP.NET?..

Answer / aryan

11 directives are at your disposal in your ASP.NET pages or
User Control.

1)@Page:- The @Page Directive enables you to specify
attributes and values for an ASP.NET page(.aspx) to be used
when the page is parsed or compiled.

2)@Master:- The @Master Directive is quite similar to the
@Page directive except that the @Master directive is meant
for master page(.master). In using the @master directive,
you specify properties of the templated page that you'll be
using in conjunction with any number of content pages on
your site.

3)@Control:- This directive is used when you build an
ASP.NET user control. This control allows you to define the
properties to be inherited by the user control.

4)@Import:- This directive allows you to specify a
namespace to be imported into the ASP.NET page or user
control.This directive supports only a single attribute:
Namespace.

5)@Implements:-This directive gets the ASP.NET page to
implement a specified .NET Framework interface. This
directive supports only single attribute: Interface.

6)@Register:- This directive associates aliases with
namespaces and class names for notation in custom server
control syntax.This directive supports five attributes:
Assembly,Namespace,Src,TagName,TagPrefix.

7)@Assembly:- This directive attaches assemblies, the
building blocks of .NET applications, to an ASP.NET page or
user control as it compiles,thereby making all the
assembly's classes and interfaces available to the page.
This directive supports 2 attributes: Name and Src.

8)@PreviousPageType:- This directive is used to specify the
page from which any cross-page postings originate. This
directive supports two attributes: TypeName,VirtualPath.

9)@MasterType:- This directive associates a class name to
an ASP.NET page in order to get at strongly typed
references or members contained within the specified master
page. This directive supports two attributes:
TypeName,VirtualPath.

10)@OutputCache:- This directive controls the output
caching policies of an ASP.NET page or user control. This
directive supports the ten attributes:
CacheProfile,Duration,Location,NoStore,Shared,SqlDependency,
VaryByControl,VaryByCustom,VaryByHeader and VaryByParam.

11)@Reference:- This directive declares that another
ASP.NET page or user control should be compiled along with
the active page or control. This directive supports just a
single attribute: VirtualPath.


7)@Assembly

Is This Answer Correct ?    16 Yes 3 No

How many Directives r in ASP.NET?..

Answer / praveen

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

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

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

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

@ 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.

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

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

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

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

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

@ 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 ?    11 Yes 0 No

How many Directives r in ASP.NET?..

Answer / senthil kumar

assembly directive
register directive
page directive
implements directive
import directive

Is This Answer Correct ?    18 Yes 15 No

How many Directives r in ASP.NET?..

Answer / subhash

There is one more directive called @ WebHandler

Is This Answer Correct ?    3 Yes 2 No

How many Directives r in ASP.NET?..

Answer / shashank

There are one more directive in Page directives Application-global.asax

Is This Answer Correct ?    1 Yes 0 No

How many Directives r in ASP.NET?..

Answer / paresh rao + jignesh panchal

There 9 Directives in ASP.Net

Is This Answer Correct ?    8 Yes 22 No

Post New Answer

More ASP.NET Interview Questions

Explain how can we access static variable?

0 Answers  


What are the features that make asp.net more used framework? : asp.net mvc

0 Answers  


What is cookies in asp net?

0 Answers  


What is css in asp.net?

0 Answers  


What does aspnet_regiis -i do ?

1 Answers  






Define state managenent?Descibe state managenent technique which maintain the information at server site focusing it IDS features and limitations?

1 Answers  


What is a web farm?

0 Answers  


What is the difference between web.config and machine.config in ASP.NET?

0 Answers   Amazon,


Where is the view state data stored?

0 Answers  


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

0 Answers  


To wrap up a call to a Web service the standard used is..?

0 Answers   Siebel,


Define msil.

0 Answers  


Categories