in Education by
What is page directives in ASP.NET?

1 Answer

0 votes
by

Basically Page Directives are commands. These commands are used by the compiler when the page is compiled.

How to use the directives in an ASP.NET page

It is not difficult to add a directive to an ASP.NET page. It is simple to add directives to an ASP.NET page. You can write directives in the following format:

<%@[Directive][Attributes]%>

See the directive format, it starts with "<%@" and ends with "%>". The best way is to put the directive at the top of your page. But you can put a directive anywhere in a page. One more thing, you can put more than one attribute in a single directive.

Here is the full list of directives,

  • @Page
  • @Master
  • @Control
  • @Import
  • @Implements
  • @Register
  • @Assembly
  • @MasterType
  • @Output Cache
  • @PreviousPageType
  • @Reference

Related questions

0 votes
    How can we improve the Performance of an ASP.NET Web Page?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    What is cross-page posting in ASP.NET?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
    What is the ASP.NET page life cycle events?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
0 votes
    What is master page in ASP.NET?...
asked Apr 6, 2021 in Education by JackTerrance
0 votes
    What is Enterprise Library in ASP.NET?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    What is Data Cache in ASP.NET and how to use?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
0 votes
    What are the Navigations techniques in ASP.NET?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    What is Themes in ASP.NET?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    Explain Cookie-less Session in ASP.NET?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
    What is the PostBack property in ASP.NET?...
asked Apr 8, 2021 in Education by JackTerrance
0 votes
0 votes
    What are the differences between ASP.NET HttpHandler and HttpModule?...
asked Apr 7, 2021 in Education by JackTerrance
0 votes
    What is the difference between HttpContext.Current.Items and HttpContext.Current.Session in ASP.NET?...
asked Apr 7, 2021 in Education by JackTerrance
...