Using XML with ASP and the ASP:Repeater Please use speaker notes for additional information!

Slides:



Advertisements
Similar presentations
Samsung Smart TV is a web-based application running on an application engine installed on digital TVs connected to the Internet.
Advertisements

Sometimes you need to use data from more than one table. In example1, the report displays data from two separate tables. Employee IDs exist in the EMPLOYEES.
4d. Structured Query Language – JOIN Operation Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis with Spreadsheets.
An End-User Perspective On Using NatQuery Building an Expression Variable T
Computer Science and Computer Engineering. parts of the computer.
Launching of Planning & Research Website Cum Orientation on Online Enrolment Monitoring and Personnel Registration System BY ALFREDO C. MEDRANO PLANNING.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Designing a Database Unleashing the Power of Relational Database Design.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Human Resource Management
SQL Use of Functions Character functions Please use speaker notes for additional information!
1 Relational Databases. 2 Find Databases here… 3 And here…
Introduction. » How the course works ˃Homework ˃Project ˃Exams ˃Grades » prerequisite ˃CSCI 6441: Mandatory prerequisite ˃Take the prereq or get permission.
Processing using XML (hierarchy data structure) Please use speaker notes for additional information!
Scoring Program Updates & XML upload to the NSRCA web site July 2013.
Sessionals Online HR SERVICES - OHRM. HR Services 2 What we will be covering today 1.Sessional Engagement Form 2.Schedule Online 3.Variation Online 4.Reports.
More JavaScript Examples Please use speaker notes for additional information!
Break Processing Please use speaker notes for additional information!
Introduction to Tables/Arrays Please use the speaker notes for additional information. Tables/Arrays.
XML with ASP using ASP:DataList Please use speaker notes for additional information!
Applicants Please use speaker notes for additional information!
Introduction to XML Please use speaker notes for additional information!
CIS 375—Web App Dev II ASP.NET 7 Binding (based on w3schools.com— also see MSDN.NET developmentMSDN.NET development.
Array - adding to array at run time Please see speaker notes for additional information!
Nested Queries (Sub Queries) A nested query is a form of a SELECT command that appears inside another SQL statement. It is also termed as subquery. The.
ASP.NET - accessing the database - datareader vs dataset - datagrid vs datalist - brief look at web matrix.
Introduction. » How the course works ˃Homework ˃Project ˃Exams ˃Grades » prerequisite ˃CSCI 6441: Mandatory prerequisite ˃Take the prereq or get permission.
XML and DTD Please you speaker notes for additional information!
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 5 Arrays.
My Future Career in Information Systems  How Computer Skills Will Open Up Opportunities  Created by: Cody Larson  Class Section:  Instructor:
USING XML AS A DATA SOURCE. Data binding is a process by which information in a data source is stored as an object in computer memory. In this presentation,
Careers in Information Technology. Pick a Career Computer Programmer Computer Software Engineers Computer Support Specialist Computer Systems Analysts.
Database Systems Part VII: XML Querying Software School of Hunan University
Examples dealing with cursors and tables Please use speaker notes for additional information!
Robin Mullinix Systems Analyst GeorgiaFIRST Financials PeopleSoft Query: The Next Step.
XP 1 New Perspectives on XML Binding XML Data with Internet Explorer.
Chapter 8 Working With Databases in ASP.NET. Listing 8.1 – ShowListControls Uses The SqlDataSource control for estabishing database connectivity and.
Databases MIS 21. Some database terminology  Database: integrated collection of data  Database Management System (DBMS): environment that provides mechanisms.
Next Back A-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All rights.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
New Perspectives on XML, 2nd Edition Tutorial 9B1 USING XML AS A DATA SOURCE TUTORIAL 9B.
CIS 375—Web App Dev II ASP.NET 8 More Binding. 2 The Repeater ControlThe Repeater Control 1 The Repeater control is used to display a repeated list of.
More on views Please refer to speaker notes for additional information!
SQL and Conditions Speaker notes will provide additional information!
Explanation of SAMPLEIF (if88in1.cbl or if88in1.html) Please use speaker notes for additional information!
Database Design. The process of developing database structures from user requirements for data a structured methodology Structured Methodology - a number.
When I want to work with SQL, I start off as if I am doing a regular query.
Notes on ADO from other projects Please use speaker notes for additional information!
Introduction to Oracle - SQL Additional information is available in speaker notes!
ASP.NET Binding and an Introduction to Database Queries Please use speaker notes for additional information!
Chapter 13.3: Databases Invitation to Computer Science, Java Version, Second Edition.
CIS 375—Web App Dev II ASP.NET 5 Events. 2 The Page_Load Event The Page_Load event is triggered when a page loads. [Example]Example Sub Page_Load lbl1.Text="The.
ASET 1 Amity School of Engineering & Technology B. Tech. (CSE/IT), III Semester Database Management Systems Jitendra Rajpurohit.
We want to add here all the Eleven schools that are functional. Next slide shows how it would look when we click on School of Studies.
Visual Basic - Break Processing
Processing multiple files
Presentation by: Paul Kieffer
Database Design.
This shows the user interface and the SQL Select for a situation with two criteria in an AND relationship.
Introduction to the Array
EPAR Training Module Transfer 11/9/2018 ePAR - Transfer.
Department Array in Visual Basic
Please use speaker notes for additional information!
Introduction to Views and Reports
Using CASE Value expression
Please use speaker notes for additional information!
Working With Databases
PHASE I AND PHASE II PROCESSES
Access Click on file and then you want a new database.
Nagendra Vemulapalli Access chapters 1&2 Nagendra Vemulapalli
Presentation transcript:

Using XML with ASP and the ASP:Repeater Please use speaker notes for additional information!

Stephen Daniels Sports Reporter Al Richards Engineering Consultant Jennifer Ames Foreign Consultant Sarah Grant Scientific Web Carl Hersey Foreign Consultant Continued...

sub Page_Load if Not Page.IsPostBack then dim payrollData=New DataSet payrollData.ReadXml(MapPath("payroll.xml")) payrollSet.DataSource=payrollData payrollSet.DataBind() end if end sub This is imported to allow us to work with DataSet objects. This creates a DataSet that I named payrollData for the XML file. When the page is loaded, the XML file is loaded into the DataSet to make it available Code continued on the next page... This establishes the DataSource and binds the DataSet to the Repeater control that you will see on the next page.

Employee List Last Name First Name Dept Job Salary The asp:Repeater is used with payrollSet (refer to previous slide). Finally, the closing of asp:Repeater, and the form. The is done only once and it is done first. The contents of the are repeated. As you can see looking at the output, each element in the XML is repeated. Like, the is rendered once - the table is ended. DataItems under Employee in the XML are repeated.

sub Page_Load if Not Page.IsPostBack then dim payrollData=New DataSet payrollData.ReadXml(MapPath("payroll.xml")) payrollSet.DataSource=payrollData payrollSet.DataBind() end if end sub Employee List Last Name First Name Dept Job Salary Continue...

sub Page_Load if Not Page.IsPostBack then dim payrollData=New DataSet payrollData.ReadXml(MapPath("payroll.xml")) payrollSet.DataSource=payrollData payrollSet.DataBind() end if end sub Employee List Last Name First Name Dept Job Salary

Programming Grocer Webmaster Grocer Networking Arruda Business Information Grocer Multimedia/Internet Vieira Computer Science Ferreira Information Systems Grocer Accounting Garand Marketing Management Leonard Retail Management Dickens Business Administration Leonard

sub Page_Load if Not Page.IsPostBack then dim optionData=New DataSet optionData.ReadXml(MapPath("bccopt.xml")) optionSet.DataSource=optionData optionSet.DataBind() end if end sub Option List Option Name Option Advisor

Programming Grocer Webmaster Grocer Stephen Daniels Sports Reporter Al Richards Engineering Consultant The root is bcc which is made up of option which has multiple occurrences and is basically the record. You can then think of the record as containing two fields: optionname and optionadv. The root is PERSONNEL which is made up of EMPLOYEE which has multiple occurrences and is basically the record. You can then think of the record as containing five fields: FIRST_NAME, LAST_NAME, DEPT, JOB and SALARY.

Computer Information Systems Career Programming Grocer Webmaster Grocer Networking Arruda Business Information Grocer Multimedia/Internet Vieira Transfer

Computer Science Ferreira Information Systems Grocer Business Career Accounting Garand Marketing Management Leonard Retail Management Dickens Transfer Business Administration Leonard

Computer Information Systems Career Programming Grocer As you can see, three tables were set up - one to deal with department, one to deal with optiontype and one to deal with option. Computer Information Systems is the first deptname within department (id is 0) and Business is the second deptname with department (id is 1). The relationships are expressed with nested set to true. Option is nested under optiontype and optiontype is nested under department.

The optiontype Table shows that Career is under the department with the id=0 and is optiontype=0. The next occurrence is Transfer which is still under department with id=0 and it has optiontype=0. The next occurrence of Career is with department id=1 and under optiontype it is 2 etc. The option Table shown here shows the optiontype id and then the optionname and option adviser. Note that the first group was under Computer Information Systems and Career and their were 5 options. You see this with optiontype having id=0 on the first 5. Computer Information Systems and Transfer had only two - you can also see that.

sub Page_Load if Not Page.IsPostBack then dim optionData=New DataSet optionData.ReadXml(MapPath("bccoptions.xml")) dgrTables.DataSource=optionData.Tables dgrTables.DataBind() dgrRelations.DataSource=optionData.Relations dgrRelations.DataBind() dgrDept.DataSource=optionData.Tables("department") dgrDept.DataBind() dgrOptTyp.DataSource=optionData.Tables("optiontype") dgrOptTyp.DataBind() dgrOptn.DataSource=optionData.Tables("option") dgrOptn.DataBind() end if end sub Defines a new DataSet named optionData which is related to the physical bccoptions.xml for reading. Establishes the Tables collection of the optionData dataset as the data source for the dgrTables datagrid and binds the data. Establishes the “option” table in the Tables collection of the optionData dataset as the data source for the dgrOptn datagrid within the tables collection of the DataSet and bind the data.

Tables Relationships department Table optiontype Table option Table

Here we can see the option which contains optionname and optionadv. Here we can see optiontype which includes typename and options. Here we can see department which includes deptname and optiontype. Here we recognize bcc.

sub Page_Load if Not Page.IsPostBack then dim optionData=New DataSet optionData.ReadXml(MapPath("bccoptions.xml")) xmpResults.InnerHtml = "" xmpResults.InnerHtml = optionData.getXmlSchema() & vbCrlf & vbCrlf xmpResultd.InnerHtml = "" xmpResultd.InnerHtml = optionData.getXml() & vbCrlf & vbCrlf end if end sub Option List

sub Page_Load if Not Page.IsPostBack then dim optionData=New DataSet optionData.ReadXml(MapPath("bccoptions.xml")) optionSet.DataSource=optionData.Tables("option") optionSet.DataBind() end if end sub Since there are three tables involved in the structure of bccoptions.xml, I need to specify which table in the Tables collection I want to use for this program. I am specifying the option table.

Option List Option Name Option Advisor On the previous slide (the beginning of this program), I defined optionSet as: optionSet.DataSource=optionData.Tables("option")