Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How many Directives r in ASP.NET?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about the .NET framework?

1011


In which event of the page viewstate is available?

827


What is event in asp.net?

964


Just by seeing the signature of the bean how can you specify whether it is a stateful or stateless session bean?

943


What is redirecting behavior?

913


What is Web Server Control Templates.?

1012


Demonstrate Render and PreRender?

1041


Is asp.net still used?

971


What is custom events?

970


Explain how can you debug your .net application?

882


What is runat?

1004


What are the elements of a website?

935


What is css in asp.net?

1002


What is a master page and what does it do?

882


What is the difference between ASP.NET Webforms and ASP.NET MVC?

1078