Different Directives for Dot NET
Computers & Technology → Web Hosting
- Author Jessica Woodson
- Published June 7, 2010
- Word count 395
Directives are those that are responsible for any kind of change in the settings that decide the actions of an entire page. They are language specific and for .NET they function as settings of the parser and compiler. They can be used anywhere in a page, but in most of the cases it is best to use them in the beginning of the page for best results. Directives are used in both .aspx files (ASP.NET pages) and .ascx files (user control pages).
Let see some of the main kinds of Directives used:
@Page directive:
This is used to define page specific attributes used by ASP.NET page parser and compiler. It can be included only in .aspx files and it also defines the language of the page just like c# and VB.
@Control:
This works much in the same way except that it is used specifically for User Controls. Also included only in .aspx and they control the view state of the page.
@Import:
This one is used to import a namespace into a page or user space. But one directive can import any one namespace only and if there is a need to import more than one then multiple directives will have to be used.
@Implements:
It shows whether the current page or a particular user control follows the specified .NET framework interface or not.
@Register:
This one is a powerful tool which is used to create dynamically creating tags that represent your user controls. It helps to create a tag name and tag prefix to which all the user controls are associated and can be dropped onto a page by just one single simple tag.
@Assembly:
This is used to link an assembly to an application or a web page at parse time. It is contained in either global.asax file, for application-wide linking, or in a page (.aspx) or user control (.ascx) file, for linking to a specific page or user control. Each of these assembly directives can have multiple attribute or value pairs.
@OutputCache:
The OutputCache directive controls output caching for a page or user control.
@Reference:
This one allows you to know that you another page or user control has to be connected with the current page. This gives you access to the controls on the linked page and user control as a part of the Control Collection object.
IndiaNIC, LLC
1285, Montecito Ave #43,
Mountain View,
CA – 94043
Tel: (603) 320-8407
Tel : ( 707) 234-5607
Fax : ( 415 ) 520-9356
Article source: https://articlebiz.comRate article
Article comments
There are no posted comments.
Related articles
- Step-by-Step Guide to Wix Website Development
- Wordpress custom theme development
- Safeguarding Success: The Imperative of WordPress Security in Online Business
- Unlocking the potential of fivver
- Choosing the Right CMS for Website Design and Development
- Faster Hosting Boost Your Website Speed
- Create a Multi-Vendor e-Commerce site in Laravel
- Before you choose a web hosting for your affiliate website or businesses
- 5 Popular Types of Web Hosting Services Explained
- The Most Effective Way to Create a Website in 2022 | A Beginner's Guide
- How To Choose the Best Web Development Company in Egypt?
- Top 5 Event Marketing Platforms in the World
- 7 Notions Why A Local Website Designer Is Your Greatest Option
- 4 Guidelines On How To Make Your Website Stand Out
- Cheap Web Hosting Company in Bangladesh
- Best Domain And Web Hosting Company In Bangladesh
- Website Tips - How to Choose a Web Design Expert
- Tips For Choosing A Reputable Web Hosting Company
- What are the Digital Marketing Melbourne Strategies for Success?
- 10 Steps to Secure MS SQL Server Cloud Hosting
- Tips for a great web design
- Types of hosting
- Choosing A Web Host Is Simple With These Tips
- Advantages Of Managed Dedicated Server
- The Wisdom of a 30 Day Minimum Viable Product
- How is PlayStation Plus 365 tage kaufen worthy?
- How Is Cloud Application beneficial for us?
- Unisecure Data Centers : Web Hosting Traffic
- Dedicated Server Hosting: Using Affordable Strategies to Keep Your Business Active
- Cheap Domain Names: Building a Futuristic Business Empire