11 The Repeater Control. 22 Objectives You will be able to use a Repeater Control to display data obtained with a SQL query with custom formatting.

Slides:



Advertisements
Similar presentations
Table (TABLE) Contains TABLE ROWS (TR) Contains TABLE DATA (TD) Data can contain anything Text Lists Other tables Pictures …
Advertisements

Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
Murach’s ASP.NET 3.5/C#, C5© 2008, Mike Murach & Associates, Inc.Slide 1.
User Controls, Master Pages, GridView. Content User Controls Styles, Themes, Master Pages Working with Data GridView Muzaffer DOĞAN - Anadolu University2.
Chapter 9 Customizing Data with Web Controls. ASP.NET 2.0, Third Edition2.
11 User Controls II Chapter Objectives You will be able to Create a realistic reusable user control. Use data binding in a user control. Change.
4.01 Cascading Style Sheets
ETT 429 Spring 2007 Web Design I.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Microsoft Office Word 2013 Expert Microsoft Office Word 2013 Expert Courseware # 3251 Lesson 4: Working with Forms.
Tutorial #8 – Creating Data Tables. Tutorial #6 Review – Layouts Two Column Fixed Width, Three Column Fixed Width Class VS. ID Container Universal Selector.
Lecture 16: SQL and HTML tables
TUTORIAL 8: Enhancing a Web Site with Advanced CSS
1 The Structure of a Web Table beginning of the table structure first row of three in the table end of the table structure table cells You do not need.
Bayu Priyambadha, S.Kom. for long documents, you can even have links to other locations in that same document  … where ident is a variable for identifying.
CONFIGURING WINDOWS SERVER MIS 424 Professor Sandvig.
HTML & CSS A brief introduction. OUTLINE 1.What is HTML? 2.What is CSS? 3.How are they used together? 4.Troubleshooting/Common problems 5.More resources.
Creating A Simple Web Page. Step 1- Open Dreamweaver & Create A New Page (File New) and blank.
Chapter 8 Binding Data to Web Controls. ASP.NET 2.0, Third Edition2.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
HTML, Third Edition--Illustrated Introductory 1 HTML, Third Edition Illustrated Introductory Unit F Working with Tables.
INTRODUCTORY Tutorial 7 Creating Tables. XP New Perspectives on Blended HTML, XHTML, and CSS2 Objectives Discern the difference between data tables and.
Principles of Web Design 6 th Edition Chapter 10 – Data Tables.
HTML basics exercises.
Eat Your Words! Creating webpage Layout. CONTENT The Layout of a Webpage HEADER FOOTER Each of these sections represents a ‘div’ (or divider). By linking.
ASP.NET Part 4 Instructor: Charles Moen CSCI/CINF 4230.
Web Technologies Website Development Trade & Industrial Education
Chapter 71 Building Data-Driven ASP.NET Applications Introduction to ASP.NET By Kathleen Kalata.
18 People Surveyed HTML (HyperText Markup Language) HTML “tags” Describes structure Building blocks Headings, paragraphs, lists, links, images, quotes,
Website Development with Dreamweaver
1 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Microsoft Expression Web-Illustrated Unit I: Working with Tables.
Microsoft Visual Basic 2008 CHAPTER SEVEN Creating Web Applications.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
1 Data Bound Controls II Chapter Objectives You will be able to Use a Data Source control to get data from a SQL database and make it available.
Ventsislav Popov Crossroad Ltd.. 1. ASP.NET Data Source Controls  SqlDataSource  EntityDataSource  ObjectDataSource 2. Entity Data Model and ADO.NET.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
DataSource controls in.NET How to access databases.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
Chapter 8 Working With Databases in ASP.NET. Listing 8.1 – ShowListControls Uses The SqlDataSource control for estabishing database connectivity and.
HTML— More Tags, Formatting, and Lists. Formatting Tags  Bold  Italics  Underline  Big text  Small text  Subscript (H 2 O)  Superscript (10 3 )
CIS234A- Lecture 7 Instructor Greg D’Andrea. Tables A table can be displayed on a Web page either in a text or graphical format. A text table: – contains.
Table (TABLE) Contains TABLE ROWS (TR) Contains TABLE DATA (TD) Data can contain anything › Text › Lists › Other tables › Pictures › …
HTML ( HYPER TEXT MARK UP LANGUAGE ). What is HTML HTML describes the content and format of web pages using tags. Ex. Title Tag: A title It’s the job.
TRAINING SESSIONS.NET Controls.  Standard Controls  Label  Textbox  Checkbox  Button, Image Button, Image control  Radio Button  Literal  Hyperlink.
Reference: “ASP.NET 2.0 Illustrated” by Alex Homer and Dave Sussman. -ch3 illustrated book
Ventsislav Popov Crossroad Ltd.. 1. ASP.NET Data Source Controls  SqlDataSource  EntityDataSource  ObjectDataSource 2. Entity Data Model and ADO.NET.
Web Design Part I. Click Menu Site to create a new site root.
1 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 12 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 12 Accessing.
® IBM Software Group © 2006 IBM Corporation JSF Rich Text Area Component This Learning Module describes the use of the JSF Rich Text Area component – for.
 Look especially at › File Tips and Shortcuts › Student video.
1 HTML Tables. 22 Objectives You will be able to Create tables in HTML.
1 CS 3870/CS 5870: Note07 Prog 4. Master Pages Creating a master page based on another master page MainMasterPage –For all Progs and Tests Prog4MasterPage.
1 CS 3870/CS 5870: Note07 Prog 4. Master Pages Creating a master page based on another master page MainMasterPage –For all Progs and Tests Prog4MasterPage.
Positioning Objects with CSS and Tables
1 Preparation for site Create a folder in MyDocuments: beavercheese. Create a subfolder, images Classes, career, DW beginner Download.
CREATING MASTER PAGES Creating a Master Page Using Master Pages Giving your site a professional look and feel Adding Master Page content to existing pages.
CSS Layout Cascading Style Sheets. Lesson Overview  In this lesson, we’ll cover:  Brief CSS review  Creating sections with the tag  Creating inline.
HTML LAYOUTS. CONTENTS Layouts Example Layout Using Element Example Using Table Example Output Summary Exercise.
>> CSS Layouts. Recall Properties of Box – Border (style, width, color) – Padding – Margin – Display – Background – Dimension Welcome Padding Area Border.
Cascading Style Sheets - CSS December 20, 2008 NTPCUG Expression Web SIG.
Cascading Style Sheets Using HTML. What are they? A set of style rules that tell the web browser how to present a web page or document. In earlier versions.
Listing 9.1 ShowLocalConnection.aspx
Part 1 of 2 Creating SQL Database and Binding to GridView
In Class Programming BIS1523 – Lecture 11.
PROG Advanced Web Apps 2/24/2019 Session 9.2 Data Binding Wendi Jollymore, ACES.
CSS.
Principles of Web Design 5th Edition
Presentation transcript:

11 The Repeater Control

22 Objectives You will be able to use a Repeater Control to display data obtained with a SQL query with custom formatting.

33 The Repeater Control Displays query results on a page using a template. Snippet of HTML with blanks to be filled in with data from a data source. Repeated for each row in the data source. Greater flexibility than a GridView, at the cost of more work. The template specifies what to display from the data source and how to format it.

44 Using a Repeater Create a new web site Repeater_Demo Add a SqlDataSource Follow same procedures as last class to set up the SqlDataSource See slides 17 – 26 of 090_Data_Bound_Controls.pdf Save connection as "scorpius_connection"

5 Save Connection String

66 In Web.Config <add name="scorpius_connection" connectionString="Data Source=scorpius.eng.usf.edu;UserID=wpusr40;Password=xxx" providerName="System.Data.SqlClient" />

77 In Default.aspx <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString=" " SelectCommand="SELECT * FROM [Customers]"> Note Will generate code to retrieve the specified connection string from the connectionStrings section of web.config Done on the server as the.aspx file is being processed. Does not emit HTML. Sets a property in SqlDataSource1.

88 Drag a Repeater to the Form

99 Repeater on the Form

10 Configure the Repeater Switch to Source view.

11 The Repeater in Source View We will put a template inside the Repeater.

12 Templates A template determines the appearance and content the HTML generated by the repeater. HTML or ASP tags. Has blanks to be filled with data from the data source. Repeated for each row in the data source.

13 Repeater with Template

14 Data Binding Expression The # makes this a data binding expression. Evaluated on the server. Replaced by the value of the expression. Expression could be a public variable or method In this case it is DataBinder.Eval( ) Other possibilities.

15 DataBinder.Eval Check help for DataBinder.Eval

16 Repeater Example Build and run.

17 Repeater in Action

18 Make It a Table

A Table with Style Repeater Demo div { text-align: center; } table { border: solid 1px; margin: auto; } td { border:solid 1px; }

20 The Table

More Styling td { border:solid 1px; padding:4px; font-family:Tahoma; font-size:large; color:Blue; text-align:left }

22 More Styling

23 More Data Let’s add more data to the table. Anything in the Customers table is available. We need a DataBinder.Eval for each column that we want to show. Inside... Let's add ContactName and Phone to the page.

24 More Data

25 Table with More Data

26 Tighten it up a bit. table { border: solid 1px; margin: auto; border-collapse:collapse; }

27 Tighter Display

28 AlternatingItemTemplate An AlternatingItemTemplate can be used to give alternate rows different styling. Background color. Make a table easier to read.

29 AlternatingItemTemplate

30 AlternatingItemTemplate

Header Template We can also provide a header for the table.

32 HeaderTemplate

33 HeaderTemplate

34 Add a Page Heading

35 Final Result