SlideShare ist ein Scribd-Unternehmen logo
1 von 42
ASP.NET 4.0
Julie Iskander
MSC. Communication and Electronics
Lecture Outlines
   WebSite Design
    ◦ Master Page
    ◦ Themes and Skins
    ◦ Website Navigation
   ADO.NET Fundamentals
    ◦ Connected Model
    ◦ Disconnected Models
Website Design
“A Consistent Look and
Feel”
Master Page (.master)
 A templates that renders common
  appearance to all pages attached to it
 Rich design time support
 To work with them, we will create two
  types of pages
     MasterPages: a page template, contains
      controls and content placeholders
     ContentPages: references a single master
      page, to acquire layout, add page specific
      content in the content placeholders
.aspx                             .master

   In page                          All common HTML
    directive, MasterPageFile         tags, <html>,<head>,<bo
    = “masterpage url”                dy>
   Contain Content Control          All common controls
    that is linked to a certain      Contain
    ContentPlaceHolder in             ContentPlaceholder
    the master page                   Control  where the
   New content can be                page content will appear
    added only in the content
    control


         Master Page (.master)
Content Page
Convert from an HTML to an aspx page
Themes and skins
   What is the problem?
    ◦ To make control properties consistent, not just
      style properties
    ◦ To style complex controls like Calendar and
      Grids
   Themes:
    ◦   Are control-based, not HTML-based
    ◦   Are applied on the server
    ◦   Don’t cascade as in CSS
    ◦   Set in web.config or in each individual page
   Skins:
    ◦ Are text files with .skin extension
    ◦ Contains a list of control tags and set properties
      that need to be standardized
Themes and Skins
Convert from an HTML to an aspx page
Themes in Page Directive
Themes in web.config
Named Skins and SkinID




 What happens if all skins
 have IDs?
Themes and Skins
   Applying Themes dynamically:
    ◦ Page.Theme
    ◦ Page.StyleSheet
   This must be done in the PreInit event.
  Why????????????
 How to make a user
  change themes in his
  page?
ADO.NET
Fundamentals
ADO.NET
 Contains managed classes to connect to
  data sources (Relational DB), execute
  commands, manage disconnected data.
 It includes:
    ◦ Connection: establish connection to a
      DataSource.
    ◦ Command: execute SQL commands and stored
      procedures.
    ◦ DataReader: fast read-only, forward-only
      access.
    ◦ DataAdapter: fill DataSet from a DataSource, to
      apply changes to a DataSource, according to the
Connection class (implement
IDBConnection)
 A limited-server resource must be
  opened as late as possible and
  release it as quickly as possible.
 Connection String Stored in
  web.config
Connection class (implements
IDBConnection)
 To retrieve connection string
 Using System.Web.Configuration
Command Class (Implements
IDbCommand)
    Command class  to execute any
    type of SQL statement.
Command Methods
DataReader Class
 To read the data returned by a
  SELECT command one record at a
  time, in a forward-only, read-only
  stream.
 Provides the quickest possible access
  to data.
SQL Injection
SQL Injection Attacks
 The process of passing SQL code into
  an application, in a way that was not
  intended or anticipated by the
  application developer.
 Affects only applications that use SQL
  string building techniques to create a
  command with user-supplied values.
 Solution  use parameterized
  command or a stored procedure
Parameterized Commands
   A command that uses placeholders in
    the SQL text.
Convert from an HTML to an aspx page
Disconnected Model
   Using DataAdapters and DataSets
Disconnected Model
   Using DataSets you can:
    ◦ Work on multiple tables and relations
    ◦ Get ChildRows using the relations
    ◦ Search Tables by criteria using Select
      Method
   More in Pro ASP.NET 4 pages 340 -
    344
Convert from an HTML to an aspx page
Navigation Controls
(Self study in lab)
Site Map
   Add a web.sitemap
    ◦ XML file describing the site
Control Binding to a sitemap
   Controls to map to:
    ◦ SiteMap Path



    ◦ Menu
Reading Assignment #3
   Applying Themes Dynamically
Report #3
 How to dynamically set a MasterPage
  and in which state of the Page life
  cycle?
 What is a TreeView Control?
Lab #3
 Create masterpage.master for the
  site, with the date user control.
 Create three skins
  Default(green), Pink and Blue
  (StyleSheet, image and skin for image
  button)
 Add a sitemap to masterpage
 Add Home.aspx and Login.aspx
 Modify the three
  pages(register, books, checkout) to be
  able to use the master page
Lab #3
   In register.aspx
    ◦ Get the country and city from the
      database
   Bonus:
    ◦ Create modifyCities.aspx, using
      disconnected model insert, edit and
      delete cities.
Lab Hints
   Control ID problem with masterpage
    and css???
    ◦ Try ClientIDMode=static for page
Bonus
   Add a usercontrol to change
    themes, with the radiobuttons. Add it
    to the masterpage. How will it be
    applied to all pages????
REFERENCES

 [1] Beginning ASP.NET 4 In C# 2010, Matthew
  Macdonald, Apress
 [2] Web Application Architecture
  Principles, Protocols And Practices, Leon Shklar
  And Richard Rosen, Wiley
 [3] Professional AS P.NE T 4 In C# And VB, Bill
  Evjen, Scott Hanselman And Devin Rader, Wiley
 [4] Pro ASP.NET In C# 2010, Fourth
  Edition,matthew Macdonald, Adam Freeman, And
  Mario Szpuszta, Apress

Weitere ähnliche Inhalte

Was ist angesagt?

ASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites AppearanceASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites AppearanceRandy Connolly
 
ACTIVE SERVER PAGES BY SAIKIRAN PANJALA
ACTIVE SERVER PAGES BY SAIKIRAN PANJALAACTIVE SERVER PAGES BY SAIKIRAN PANJALA
ACTIVE SERVER PAGES BY SAIKIRAN PANJALASaikiran Panjala
 
04 asp.net session05
04 asp.net session0504 asp.net session05
04 asp.net session05Mani Chaubey
 
Gabriel Gayhart - XML Pointer File Example
Gabriel Gayhart - XML Pointer File ExampleGabriel Gayhart - XML Pointer File Example
Gabriel Gayhart - XML Pointer File Examplelinkedinsys
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...WebStackAcademy
 
Using js link and display templates
Using js link and display templatesUsing js link and display templates
Using js link and display templatesPaul Hunt
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauSpiffy
 
Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaJignesh Aakoliya
 
My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!rommel_gagasa
 
SharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
SharePoint 2013 Client-Side Rendering (CSR) & JSLink TemplatesSharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
SharePoint 2013 Client-Side Rendering (CSR) & JSLink TemplatesMuawiyah Shannak
 
Building Cool apps with flex
Building Cool apps with flexBuilding Cool apps with flex
Building Cool apps with flexJoseph Khan
 
Introduction to Adobe Flex - Zaloni
Introduction to Adobe Flex - ZaloniIntroduction to Adobe Flex - Zaloni
Introduction to Adobe Flex - ZaloniJoseph Khan
 

Was ist angesagt? (18)

Master pages
Master pagesMaster pages
Master pages
 
Master page in asp.net
Master page in asp.netMaster page in asp.net
Master page in asp.net
 
Master page
Master pageMaster page
Master page
 
ASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites AppearanceASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites Appearance
 
ACTIVE SERVER PAGES BY SAIKIRAN PANJALA
ACTIVE SERVER PAGES BY SAIKIRAN PANJALAACTIVE SERVER PAGES BY SAIKIRAN PANJALA
ACTIVE SERVER PAGES BY SAIKIRAN PANJALA
 
Jsp
JspJsp
Jsp
 
04 asp.net session05
04 asp.net session0504 asp.net session05
04 asp.net session05
 
Gabriel Gayhart - XML Pointer File Example
Gabriel Gayhart - XML Pointer File ExampleGabriel Gayhart - XML Pointer File Example
Gabriel Gayhart - XML Pointer File Example
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 8 ...
 
Using js link and display templates
Using js link and display templatesUsing js link and display templates
Using js link and display templates
 
ASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin LauASP.NET Overview - Alvin Lau
ASP.NET Overview - Alvin Lau
 
Overview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company indiaOverview of ASP.Net by software outsourcing company india
Overview of ASP.Net by software outsourcing company india
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
SharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
SharePoint 2013 Client-Side Rendering (CSR) & JSLink TemplatesSharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
SharePoint 2013 Client-Side Rendering (CSR) & JSLink Templates
 
Building Cool apps with flex
Building Cool apps with flexBuilding Cool apps with flex
Building Cool apps with flex
 
Introduction to Adobe Flex - Zaloni
Introduction to Adobe Flex - ZaloniIntroduction to Adobe Flex - Zaloni
Introduction to Adobe Flex - Zaloni
 

Andere mochten auch (20)

Asp.net.
Asp.net.Asp.net.
Asp.net.
 
Databind in asp.net
Databind in asp.netDatabind in asp.net
Databind in asp.net
 
State management
State managementState management
State management
 
JSP Custom Tags
JSP Custom TagsJSP Custom Tags
JSP Custom Tags
 
Simple Data Binding
Simple Data BindingSimple Data Binding
Simple Data Binding
 
WCF
WCFWCF
WCF
 
Windows Presentation Foundation
Windows Presentation Foundation  Windows Presentation Foundation
Windows Presentation Foundation
 
Ch 7 data binding
Ch 7 data bindingCh 7 data binding
Ch 7 data binding
 
State management
State managementState management
State management
 
ASP.NET State management
ASP.NET State managementASP.NET State management
ASP.NET State management
 
State management in ASP.NET
State management in ASP.NETState management in ASP.NET
State management in ASP.NET
 
Web Navigation Presentation
Web Navigation PresentationWeb Navigation Presentation
Web Navigation Presentation
 
WCF tutorial
WCF tutorialWCF tutorial
WCF tutorial
 
JSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLJSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTL
 
JSP Standard Tag Library
JSP Standard Tag LibraryJSP Standard Tag Library
JSP Standard Tag Library
 
Controls in asp.net
Controls in asp.netControls in asp.net
Controls in asp.net
 
Webservices
WebservicesWebservices
Webservices
 
Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)Windows Communication Foundation (WCF)
Windows Communication Foundation (WCF)
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services Tutorial
 

Ähnlich wie ASP.NET Lecture 3

Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Thomas Robbins
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handsonPrashant Kumar
 
UX01 Customization Tour Of SharePoint - APAC Conference Sydney - 2007
UX01 Customization Tour Of SharePoint - APAC Conference Sydney - 2007UX01 Customization Tour Of SharePoint - APAC Conference Sydney - 2007
UX01 Customization Tour Of SharePoint - APAC Conference Sydney - 2007Chandima Kulathilake
 
Blooming SharePoint Design
Blooming SharePoint DesignBlooming SharePoint Design
Blooming SharePoint DesignKathy Hughes
 
SFDC UI - Introduction to Visualforce
SFDC UI -  Introduction to VisualforceSFDC UI -  Introduction to Visualforce
SFDC UI - Introduction to VisualforceSujit Kumar
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16Vivek chan
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To MvcVolkan Uzun
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET PresentationRasel Khan
 
Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Thomas Daly
 
Schaeflein Dev409 Enterprise Branding Using Site Definitions
Schaeflein Dev409 Enterprise Branding Using Site DefinitionsSchaeflein Dev409 Enterprise Branding Using Site Definitions
Schaeflein Dev409 Enterprise Branding Using Site Definitionsmferraz
 
Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.net c# MVC-5 Training-Day-2 of Day-9Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.net c# MVC-5 Training-Day-2 of Day-9AHM Pervej Kabir
 
Developing branding solutions
Developing branding solutionsDeveloping branding solutions
Developing branding solutionsThomas Daly
 

Ähnlich wie ASP.NET Lecture 3 (20)

ASP.NET Lecture 2
ASP.NET Lecture 2ASP.NET Lecture 2
ASP.NET Lecture 2
 
ASP.NET Lecture 4
ASP.NET Lecture 4ASP.NET Lecture 4
ASP.NET Lecture 4
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handson
 
Mvc
MvcMvc
Mvc
 
Migration from ASP to ASP.NET
Migration from ASP to ASP.NETMigration from ASP to ASP.NET
Migration from ASP to ASP.NET
 
UX01 Customization Tour Of SharePoint - APAC Conference Sydney - 2007
UX01 Customization Tour Of SharePoint - APAC Conference Sydney - 2007UX01 Customization Tour Of SharePoint - APAC Conference Sydney - 2007
UX01 Customization Tour Of SharePoint - APAC Conference Sydney - 2007
 
Blooming SharePoint Design
Blooming SharePoint DesignBlooming SharePoint Design
Blooming SharePoint Design
 
SFDC UI - Introduction to Visualforce
SFDC UI -  Introduction to VisualforceSFDC UI -  Introduction to Visualforce
SFDC UI - Introduction to Visualforce
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16
 
Session 1
Session 1Session 1
Session 1
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
Introduction To Mvc
Introduction To MvcIntroduction To Mvc
Introduction To Mvc
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Developing Branding Solutions for 2013
Developing Branding Solutions for 2013
 
ASP.NET Lecture 6
ASP.NET Lecture 6ASP.NET Lecture 6
ASP.NET Lecture 6
 
Schaeflein Dev409 Enterprise Branding Using Site Definitions
Schaeflein Dev409 Enterprise Branding Using Site DefinitionsSchaeflein Dev409 Enterprise Branding Using Site Definitions
Schaeflein Dev409 Enterprise Branding Using Site Definitions
 
Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
 
Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.net c# MVC-5 Training-Day-2 of Day-9Asp.net c# MVC-5 Training-Day-2 of Day-9
Asp.net c# MVC-5 Training-Day-2 of Day-9
 
Developing branding solutions
Developing branding solutionsDeveloping branding solutions
Developing branding solutions
 

Mehr von Julie Iskander

Mehr von Julie Iskander (20)

HTML 5
HTML 5HTML 5
HTML 5
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
C for Engineers
C for EngineersC for Engineers
C for Engineers
 
Design Pattern lecture 3
Design Pattern lecture 3Design Pattern lecture 3
Design Pattern lecture 3
 
Scriptaculous
ScriptaculousScriptaculous
Scriptaculous
 
Prototype Framework
Prototype FrameworkPrototype Framework
Prototype Framework
 
Design Pattern lecture 4
Design Pattern lecture 4Design Pattern lecture 4
Design Pattern lecture 4
 
Design Pattern lecture 2
Design Pattern lecture 2Design Pattern lecture 2
Design Pattern lecture 2
 
Design Pattern lecture 1
Design Pattern lecture 1Design Pattern lecture 1
Design Pattern lecture 1
 
Ajax and ASP.NET AJAX
Ajax and ASP.NET AJAXAjax and ASP.NET AJAX
Ajax and ASP.NET AJAX
 
jQuery
jQueryjQuery
jQuery
 
ASP.NET Lecture 5
ASP.NET Lecture 5ASP.NET Lecture 5
ASP.NET Lecture 5
 
ASP.NET lecture 8
ASP.NET lecture 8ASP.NET lecture 8
ASP.NET lecture 8
 
ASP.NET Lecture 7
ASP.NET Lecture 7ASP.NET Lecture 7
ASP.NET Lecture 7
 
AJAX and JSON
AJAX and JSONAJAX and JSON
AJAX and JSON
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScript
 
DOM and Events
DOM and EventsDOM and Events
DOM and Events
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side Javascript
 
HTML and CSS part 3
HTML and CSS part 3HTML and CSS part 3
HTML and CSS part 3
 
HTML and CSS part 2
HTML and CSS part 2HTML and CSS part 2
HTML and CSS part 2
 

Kürzlich hochgeladen

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Kürzlich hochgeladen (20)

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

ASP.NET Lecture 3

  • 1. ASP.NET 4.0 Julie Iskander MSC. Communication and Electronics
  • 2. Lecture Outlines  WebSite Design ◦ Master Page ◦ Themes and Skins ◦ Website Navigation  ADO.NET Fundamentals ◦ Connected Model ◦ Disconnected Models
  • 4. Master Page (.master)  A templates that renders common appearance to all pages attached to it  Rich design time support  To work with them, we will create two types of pages  MasterPages: a page template, contains controls and content placeholders  ContentPages: references a single master page, to acquire layout, add page specific content in the content placeholders
  • 5. .aspx .master  In page  All common HTML directive, MasterPageFile tags, <html>,<head>,<bo = “masterpage url” dy>  Contain Content Control  All common controls that is linked to a certain  Contain ContentPlaceHolder in ContentPlaceholder the master page Control  where the  New content can be page content will appear added only in the content control Master Page (.master)
  • 6.
  • 8. Convert from an HTML to an aspx page
  • 9. Themes and skins  What is the problem? ◦ To make control properties consistent, not just style properties ◦ To style complex controls like Calendar and Grids  Themes: ◦ Are control-based, not HTML-based ◦ Are applied on the server ◦ Don’t cascade as in CSS ◦ Set in web.config or in each individual page  Skins: ◦ Are text files with .skin extension ◦ Contains a list of control tags and set properties that need to be standardized
  • 11. Convert from an HTML to an aspx page
  • 12. Themes in Page Directive
  • 14. Named Skins and SkinID What happens if all skins have IDs?
  • 15. Themes and Skins  Applying Themes dynamically: ◦ Page.Theme ◦ Page.StyleSheet  This must be done in the PreInit event. Why????????????  How to make a user change themes in his page?
  • 17. ADO.NET  Contains managed classes to connect to data sources (Relational DB), execute commands, manage disconnected data.  It includes: ◦ Connection: establish connection to a DataSource. ◦ Command: execute SQL commands and stored procedures. ◦ DataReader: fast read-only, forward-only access. ◦ DataAdapter: fill DataSet from a DataSource, to apply changes to a DataSource, according to the
  • 18. Connection class (implement IDBConnection)  A limited-server resource must be opened as late as possible and release it as quickly as possible.  Connection String Stored in web.config
  • 19. Connection class (implements IDBConnection)  To retrieve connection string  Using System.Web.Configuration
  • 20. Command Class (Implements IDbCommand)  Command class  to execute any type of SQL statement.
  • 22. DataReader Class  To read the data returned by a SELECT command one record at a time, in a forward-only, read-only stream.  Provides the quickest possible access to data.
  • 23.
  • 25. SQL Injection Attacks  The process of passing SQL code into an application, in a way that was not intended or anticipated by the application developer.  Affects only applications that use SQL string building techniques to create a command with user-supplied values.  Solution  use parameterized command or a stored procedure
  • 26. Parameterized Commands  A command that uses placeholders in the SQL text.
  • 27. Convert from an HTML to an aspx page
  • 28. Disconnected Model  Using DataAdapters and DataSets
  • 29.
  • 30. Disconnected Model  Using DataSets you can: ◦ Work on multiple tables and relations ◦ Get ChildRows using the relations ◦ Search Tables by criteria using Select Method  More in Pro ASP.NET 4 pages 340 - 344
  • 31. Convert from an HTML to an aspx page
  • 33. Site Map  Add a web.sitemap ◦ XML file describing the site
  • 34.
  • 35. Control Binding to a sitemap  Controls to map to: ◦ SiteMap Path ◦ Menu
  • 36. Reading Assignment #3  Applying Themes Dynamically
  • 37. Report #3  How to dynamically set a MasterPage and in which state of the Page life cycle?  What is a TreeView Control?
  • 38. Lab #3  Create masterpage.master for the site, with the date user control.  Create three skins Default(green), Pink and Blue (StyleSheet, image and skin for image button)  Add a sitemap to masterpage  Add Home.aspx and Login.aspx  Modify the three pages(register, books, checkout) to be able to use the master page
  • 39. Lab #3  In register.aspx ◦ Get the country and city from the database  Bonus: ◦ Create modifyCities.aspx, using disconnected model insert, edit and delete cities.
  • 40. Lab Hints  Control ID problem with masterpage and css??? ◦ Try ClientIDMode=static for page
  • 41. Bonus  Add a usercontrol to change themes, with the radiobuttons. Add it to the masterpage. How will it be applied to all pages????
  • 42. REFERENCES  [1] Beginning ASP.NET 4 In C# 2010, Matthew Macdonald, Apress  [2] Web Application Architecture Principles, Protocols And Practices, Leon Shklar And Richard Rosen, Wiley  [3] Professional AS P.NE T 4 In C# And VB, Bill Evjen, Scott Hanselman And Devin Rader, Wiley  [4] Pro ASP.NET In C# 2010, Fourth Edition,matthew Macdonald, Adam Freeman, And Mario Szpuszta, Apress

Hinweis der Redaktion

  1. One way is by creating a template page that inherits System.Web.UI.Page, and use it as a parent to all other pagesVS Design doen’t support that
  2. When a page with masterpage is requested, the master page must be rendered and merged with the page contents to create a single final, page to be rendered to the response
  3. Master Directive
  4. MasterPage.masterDefault.aspxTry writing outside of content holder see errorSee designer
  5. If a property is specified in a theme and in the individual control, the theme overrides all other
  6. Theme a folder contains css and skins
  7. Try creating theme folder and add stylesTry creating skins for a calendar controlNo skin designer support, copy and past controls from pages after setting itTry cascading effect (theme vs. styesheettheme)
  8. Only controls with the skinID will apply the skin
  9. After PreInitthrow an exception because after preinit controls are createdTheme changes aren’t read until page reload and passed PreInitstageuseServer.Transfer to refresh to itself.
  10. Standardized ADO.NET through depending on a number of interfaces and base classes.
  11. Connection.Close equivalent to connection.Dispose()
  12. ADO.Net page
  13. ADO.Net page