SlideShare a Scribd company logo
 W H A T I T M E A N S ?
 H O W T O U S E ?
 T Y P E S
 A T T R I B U T E S
 Q & A
ASP.NET - Directives
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : What it means?
The directives are instructions that specify optional
settings in Asp.Net.
These instructions include registering a custom
control, page language etc.
It describes how the .aspx pages (web forms) or .ascx
pages (user controls) are processed by the .Net
framework.
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : How to use?
The syntax for declaring a directive is:
<%@ directive_name attribute=value
[attribute=value] %>
Page Directives can be placed anywhere in .aspx or
.ascx file. But standard practice is to include them at
the top .
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives :Types
 Application Directive
 Assembly Directive
 Control Directive
 Implements Directive
 Import Directive
 Master Directive
 MasterType Directive
 OutputCache Directive
 Page Directive
 PreviousPageType Directive
 Reference Directive
 Register Directive
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : Application Directive
 The Application directive is used to define
application-specific attributes.
 It is provided at the top of the global.aspx file.
Attributes Description
Inherits The name of the class from which to inherit.
Description The text description of the application. Parsers and
compilers ignore this.
Language The language used in code blocks.
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : Assembly Directive
 The Assembly directive links an assembly to the page or
the application at parse time.
 This could appear either in the global.asax file for
application-wide linking, in the page file, a user control
file for linking to a page or user control.
Attributes Description
Name The name of the assembly to be linked.
Src The path to the source file to be linked and compiled
dynamically.
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : Control Directive
 The control directive is used with the user controls and
appears in the user control (.ascx) files.
Attributes Description
AutoEventWireup The Boolean value that enables or disables automatic
association of events to handlers.
ClassName The file name for the control.
Debug The Boolean value that enables or disables compiling
with debug symbols.
Description The text description of the control page, ignored by
compiler.
EnableViewState The Boolean value that indicates whether view state is
maintained across page requests.
Explicit For VB language, tells the compiler to use option explicit
mode.
Continue.
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : Control Directive
Attributes Description
Inherits The class from which the control page inherits.
Language The language for code and script.
Src The filename for the code-behind class.
Strict For VB language, tells the compiler to use the option
strict mode.
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : Implements Directive
 The Implement directive indicates that the web page,
master page or user control page must implement the
specified .Net framework interface.
 <%@ Implements Interface="interface_name" %>
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : Import Directive
 The Import directive imports a namespace into a
web page, user control page of application.
 <%@ namespace="System.Drawing" %>
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : Master Directive
 The Master directive specifies a page file as being the mater page.
<%@ MasterPage Language="C#" AutoEventWireup="true"
CodeFile="SiteMater.master.cs" Inherits="SiteMaster" %>
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : MasterType Directive
 The MasterType directive assigns a class name to the
Master property of a page, to make it strongly typed.
<%@ MasterType attribute="value"[attribute="value" ...]
%>
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : OutputCache Directive
 The OutputCache directive controls the output caching
policies of a web page or a user control.
<%@ OutputCache Duration="10" VaryByParam="None"
%>
duration="10” - it tells the page how many seconds to
cache the content
VaryByParam – cache depending upon parameter value
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : Page Directive
 The Page directive defines the attributes specific to the page
file for the page parser and the compiler.
Attributes Description
AutoEventWireup The Boolean value that enables or disables page events
that are being automatically bound to methods; for
example, Page_Load.
Buffer The Boolean value that enables or disables HTTP
response buffering.
ClassName The class name for the page.
ClientTarget The browser for which the server controls should render
content.
CodeFile The name of the code behind file
Description The text description of the page, ignored by the parser.
Dhammapal Kamble - Sr. Software Developer 19 June 2019
Continue.
ASP.NET – Directives : Page Directive
Attributes Description
EnableSessionState It enables, disables, or makes session state read-only.
EnableViewState The Boolean value that enables or disables view state
across page requests.
ErrorPage URL for redirection if an unhandled page exception
occurs.
Inherits The name of the code behind or other class.
Src The file name of the code behind class.
Trace It enables or disables tracing.
TraceMode It indicates how trace messages are displayed, and sorted
by time or category.
Transaction It indicates if transactions are supported.
Language The programming language for code.
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives
 PreviousPageType directive
 assigns a class to a page, so that the page is strongly typed.
 Reference Directive
 The Reference directive indicates that another page or user control should
be compiled and linked to the current page.
<%@ Reference Page ="somepage.aspx" %>
 The Register Directive
 The Register derivative is used for registering the custom server controls
and user controls.
<%@ Register Src="~/footer.ascx" TagName="footer" TagPrefix="Tfooter"
%>
Dhammapal Kamble - Sr. Software Developer 19 June 2019
ASP.NET – Directives : Questions
Thank You !
Dhammapal Kamble - Sr. Software Developer 19 June 2019

More Related Content

What's hot

Page layout with css
Page layout with cssPage layout with css
Page layout with css
Er. Nawaraj Bhandari
 
ppt of web designing and development
ppt of web designing and developmentppt of web designing and development
ppt of web designing and development
47ishu
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
David Lindkvist
 
WEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web DevelopmentWEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web Development
Randy Connolly
 
Js ppt
Js pptJs ppt
Js ppt
Rakhi Thota
 
Lecture-1: Introduction to web engineering - course overview and grading scheme
Lecture-1: Introduction to web engineering - course overview and grading schemeLecture-1: Introduction to web engineering - course overview and grading scheme
Lecture-1: Introduction to web engineering - course overview and grading scheme
Mubashir Ali
 
JavaScript
JavaScriptJavaScript
JavaScript
Vidyut Singhania
 
Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal Basics
Juha Niemi
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
Mai Moustafa
 
Introduction to XHTML
Introduction to XHTMLIntroduction to XHTML
Introduction to XHTML
Hend Al-Khalifa
 
Web technology lab manual
Web technology lab manualWeb technology lab manual
Web technology lab manual
neela madheswari
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Folasade Adedeji
 
Fundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersFundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-Developers
Lemi Orhan Ergin
 
HTML, CSS And JAVASCRIPT!
HTML, CSS And JAVASCRIPT!HTML, CSS And JAVASCRIPT!
HTML, CSS And JAVASCRIPT!
Syahmi RH
 
Basic Web Concepts
Basic Web ConceptsBasic Web Concepts
Basic Web Concepts
Cherry Ann Labandero
 
02 xml schema
02 xml schema02 xml schema
02 xml schema
Baskarkncet
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
Rajkumarsoy
 
Responsive web designing
Responsive web designingResponsive web designing
Responsive web designing
Aanand Bohara
 
Frontend Crash Course: HTML and CSS
Frontend Crash Course: HTML and CSSFrontend Crash Course: HTML and CSS
Frontend Crash Course: HTML and CSS
Thinkful
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
Singsys Pte Ltd
 

What's hot (20)

Page layout with css
Page layout with cssPage layout with css
Page layout with css
 
ppt of web designing and development
ppt of web designing and developmentppt of web designing and development
ppt of web designing and development
 
HTML CSS & Javascript
HTML CSS & JavascriptHTML CSS & Javascript
HTML CSS & Javascript
 
WEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web DevelopmentWEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web Development
 
Js ppt
Js pptJs ppt
Js ppt
 
Lecture-1: Introduction to web engineering - course overview and grading scheme
Lecture-1: Introduction to web engineering - course overview and grading schemeLecture-1: Introduction to web engineering - course overview and grading scheme
Lecture-1: Introduction to web engineering - course overview and grading scheme
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Introduction to Drupal Basics
Introduction to Drupal BasicsIntroduction to Drupal Basics
Introduction to Drupal Basics
 
HTML CSS Basics
HTML CSS BasicsHTML CSS Basics
HTML CSS Basics
 
Introduction to XHTML
Introduction to XHTMLIntroduction to XHTML
Introduction to XHTML
 
Web technology lab manual
Web technology lab manualWeb technology lab manual
Web technology lab manual
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Fundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-DevelopersFundamentals of Web Development For Non-Developers
Fundamentals of Web Development For Non-Developers
 
HTML, CSS And JAVASCRIPT!
HTML, CSS And JAVASCRIPT!HTML, CSS And JAVASCRIPT!
HTML, CSS And JAVASCRIPT!
 
Basic Web Concepts
Basic Web ConceptsBasic Web Concepts
Basic Web Concepts
 
02 xml schema
02 xml schema02 xml schema
02 xml schema
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Responsive web designing
Responsive web designingResponsive web designing
Responsive web designing
 
Frontend Crash Course: HTML and CSS
Frontend Crash Course: HTML and CSSFrontend Crash Course: HTML and CSS
Frontend Crash Course: HTML and CSS
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 

Similar to ASP.NET - Directives

Overview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company indiaOverview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company india
Jignesh Aakoliya
 
7 network programmability concepts python-ansible
7 network programmability concepts python-ansible7 network programmability concepts python-ansible
7 network programmability concepts python-ansible
SagarR24
 
7 network programmability concepts api
7 network programmability concepts api7 network programmability concepts api
7 network programmability concepts api
SagarR24
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep Dive
Gabriel Walt
 
7 network programmability concepts api
7 network programmability concepts api7 network programmability concepts api
7 network programmability concepts api
SagarR24
 
Java8 training - Class 1
Java8 training  - Class 1Java8 training  - Class 1
Java8 training - Class 1
Marut Singh
 
Sakai App Structure
Sakai App StructureSakai App Structure
Sakai App Structure
jiali zhang
 
Directives in asp.net
Directives in asp.netDirectives in asp.net
Directives in asp.net
Sireesh K
 
Java server pages
Java server pagesJava server pages
Java server pages
Tanmoy Barman
 
AngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIAngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPI
Eric Wise
 
React & Redux JS
React & Redux JS React & Redux JS
React & Redux JS
Hamed Farag
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
Volkan Uzun
 
Adobe Experience Manager Core Components
Adobe Experience Manager Core ComponentsAdobe Experience Manager Core Components
Adobe Experience Manager Core Components
Gabriel Walt
 
Migration from ASP to ASP.NET
Migration from ASP to ASP.NETMigration from ASP to ASP.NET
Migration from ASP to ASP.NET
Information Technology
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16
Vivek chan
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
nomykk
 
Asp.net web page syntax overview
Asp.net web page syntax overviewAsp.net web page syntax overview
Asp.net web page syntax overview
Salam Khan
 
Alfresco Architecture
Alfresco ArchitectureAlfresco Architecture
Alfresco Architecture
Noushad Kabeer
 
Ruby On Rails Siddhesh
Ruby On Rails SiddheshRuby On Rails Siddhesh
Ruby On Rails Siddhesh
Siddhesh Bhobe
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
WebStackAcademy
 

Similar to ASP.NET - Directives (20)

Overview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company indiaOverview of MVC Framework - by software outsourcing company india
Overview of MVC Framework - by software outsourcing company india
 
7 network programmability concepts python-ansible
7 network programmability concepts python-ansible7 network programmability concepts python-ansible
7 network programmability concepts python-ansible
 
7 network programmability concepts api
7 network programmability concepts api7 network programmability concepts api
7 network programmability concepts api
 
AEM Sightly Deep Dive
AEM Sightly Deep DiveAEM Sightly Deep Dive
AEM Sightly Deep Dive
 
7 network programmability concepts api
7 network programmability concepts api7 network programmability concepts api
7 network programmability concepts api
 
Java8 training - Class 1
Java8 training  - Class 1Java8 training  - Class 1
Java8 training - Class 1
 
Sakai App Structure
Sakai App StructureSakai App Structure
Sakai App Structure
 
Directives in asp.net
Directives in asp.netDirectives in asp.net
Directives in asp.net
 
Java server pages
Java server pagesJava server pages
Java server pages
 
AngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIAngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPI
 
React & Redux JS
React & Redux JS React & Redux JS
React & Redux JS
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
 
Adobe Experience Manager Core Components
Adobe Experience Manager Core ComponentsAdobe Experience Manager Core Components
Adobe Experience Manager Core Components
 
Migration from ASP to ASP.NET
Migration from ASP to ASP.NETMigration from ASP to ASP.NET
Migration from ASP to ASP.NET
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Asp.net web page syntax overview
Asp.net web page syntax overviewAsp.net web page syntax overview
Asp.net web page syntax overview
 
Alfresco Architecture
Alfresco ArchitectureAlfresco Architecture
Alfresco Architecture
 
Ruby On Rails Siddhesh
Ruby On Rails SiddheshRuby On Rails Siddhesh
Ruby On Rails Siddhesh
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 7 ...
 

Recently uploaded

JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 

Recently uploaded (20)

JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 

ASP.NET - Directives

  • 1.  W H A T I T M E A N S ?  H O W T O U S E ?  T Y P E S  A T T R I B U T E S  Q & A ASP.NET - Directives Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 2. ASP.NET – Directives : What it means? The directives are instructions that specify optional settings in Asp.Net. These instructions include registering a custom control, page language etc. It describes how the .aspx pages (web forms) or .ascx pages (user controls) are processed by the .Net framework. Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 3. ASP.NET – Directives : How to use? The syntax for declaring a directive is: <%@ directive_name attribute=value [attribute=value] %> Page Directives can be placed anywhere in .aspx or .ascx file. But standard practice is to include them at the top . Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 4. ASP.NET – Directives :Types  Application Directive  Assembly Directive  Control Directive  Implements Directive  Import Directive  Master Directive  MasterType Directive  OutputCache Directive  Page Directive  PreviousPageType Directive  Reference Directive  Register Directive Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 5. ASP.NET – Directives : Application Directive  The Application directive is used to define application-specific attributes.  It is provided at the top of the global.aspx file. Attributes Description Inherits The name of the class from which to inherit. Description The text description of the application. Parsers and compilers ignore this. Language The language used in code blocks. Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 6. ASP.NET – Directives : Assembly Directive  The Assembly directive links an assembly to the page or the application at parse time.  This could appear either in the global.asax file for application-wide linking, in the page file, a user control file for linking to a page or user control. Attributes Description Name The name of the assembly to be linked. Src The path to the source file to be linked and compiled dynamically. Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 7. ASP.NET – Directives : Control Directive  The control directive is used with the user controls and appears in the user control (.ascx) files. Attributes Description AutoEventWireup The Boolean value that enables or disables automatic association of events to handlers. ClassName The file name for the control. Debug The Boolean value that enables or disables compiling with debug symbols. Description The text description of the control page, ignored by compiler. EnableViewState The Boolean value that indicates whether view state is maintained across page requests. Explicit For VB language, tells the compiler to use option explicit mode. Continue. Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 8. ASP.NET – Directives : Control Directive Attributes Description Inherits The class from which the control page inherits. Language The language for code and script. Src The filename for the code-behind class. Strict For VB language, tells the compiler to use the option strict mode. Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 9. ASP.NET – Directives : Implements Directive  The Implement directive indicates that the web page, master page or user control page must implement the specified .Net framework interface.  <%@ Implements Interface="interface_name" %> Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 10. ASP.NET – Directives : Import Directive  The Import directive imports a namespace into a web page, user control page of application.  <%@ namespace="System.Drawing" %> Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 11. ASP.NET – Directives : Master Directive  The Master directive specifies a page file as being the mater page. <%@ MasterPage Language="C#" AutoEventWireup="true" CodeFile="SiteMater.master.cs" Inherits="SiteMaster" %> Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 12. ASP.NET – Directives : MasterType Directive  The MasterType directive assigns a class name to the Master property of a page, to make it strongly typed. <%@ MasterType attribute="value"[attribute="value" ...] %> Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 13. ASP.NET – Directives : OutputCache Directive  The OutputCache directive controls the output caching policies of a web page or a user control. <%@ OutputCache Duration="10" VaryByParam="None" %> duration="10” - it tells the page how many seconds to cache the content VaryByParam – cache depending upon parameter value Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 14. ASP.NET – Directives : Page Directive  The Page directive defines the attributes specific to the page file for the page parser and the compiler. Attributes Description AutoEventWireup The Boolean value that enables or disables page events that are being automatically bound to methods; for example, Page_Load. Buffer The Boolean value that enables or disables HTTP response buffering. ClassName The class name for the page. ClientTarget The browser for which the server controls should render content. CodeFile The name of the code behind file Description The text description of the page, ignored by the parser. Dhammapal Kamble - Sr. Software Developer 19 June 2019 Continue.
  • 15. ASP.NET – Directives : Page Directive Attributes Description EnableSessionState It enables, disables, or makes session state read-only. EnableViewState The Boolean value that enables or disables view state across page requests. ErrorPage URL for redirection if an unhandled page exception occurs. Inherits The name of the code behind or other class. Src The file name of the code behind class. Trace It enables or disables tracing. TraceMode It indicates how trace messages are displayed, and sorted by time or category. Transaction It indicates if transactions are supported. Language The programming language for code. Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 16. ASP.NET – Directives  PreviousPageType directive  assigns a class to a page, so that the page is strongly typed.  Reference Directive  The Reference directive indicates that another page or user control should be compiled and linked to the current page. <%@ Reference Page ="somepage.aspx" %>  The Register Directive  The Register derivative is used for registering the custom server controls and user controls. <%@ Register Src="~/footer.ascx" TagName="footer" TagPrefix="Tfooter" %> Dhammapal Kamble - Sr. Software Developer 19 June 2019
  • 17. ASP.NET – Directives : Questions Thank You ! Dhammapal Kamble - Sr. Software Developer 19 June 2019