User Controls, Master Pages, GridView. Content User Controls Styles, Themes, Master Pages Working with Data GridView Muzaffer DOĞAN - Anadolu University2.

Slides:



Advertisements
Similar presentations
Project 8 Creating Style Sheets.
Advertisements

Chapter 8 Creating Style Sheets.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
GridView Features, DetailsView, FormView. Content GridView Features DetailsView FormView Muzaffer DOĞAN - Anadolu University2.
Chapter 9 Customizing Data with Web Controls. ASP.NET 2.0, Third Edition2.
IT533 Lecture ASP.NET Controls. Installations Microsoft® SQL Server® 2008 Express.
Unit 5: Building Presentation Layer Applications with ASP.NET 2.0.
Chapter 7 Using Advanced Cascading Style Sheets HTML5 & CSS 7 th Edition.
Integrating Access with the Web and with Other Programs.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Web-Based Applications
Building ASP.NET Applications 2 Lecture 3,4 T. Ahlam Algharasi 4 th Level.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
Chapter 14: Advanced Topics: DBMS, SQL, and ASP.NET
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Creating Tables in a Web Site Using an External Style Sheet HTML5 & CSS 7 th Edition.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Understanding HTML Style Sheets. What is a style?  A style is a rule that defines the appearance and position of text and graphics. It may define the.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
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.
Chapter 10 Managing Data with ASP.NET. ASP.NET 2.0, Third Edition2.
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
ASP.NET Part 4 Instructor: Charles Moen CSCI/CINF 4230.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Chapter 71 Building Data-Driven ASP.NET Applications Introduction to ASP.NET By Kathleen Kalata.
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
Website Development with Dreamweaver
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
CSS/417 Introduction to Database Management Systems Workshop 2.
Needs for Accessing Database To make your web site more dynamic and maintainable, you can display information on your web pages that are retrieved from.
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.
1 Web-Enabled Decision Support Systems Database Connectivity in Web Applications Don McLaughlin IE 423 (304) West.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
© 2011 Delmar, Cengage Learning Chapter 8 Using Styles and Design Style Sheets for Design.
Object Oriented Software Development 9. Creating Graphical User Interfaces.
Delivering Excellence in Software Engineering ® EPAM Systems. All rights reserved. Data Binding in ASP.NET.
Introduction to ASP.NET T.Ahlam Algharasi. The Visual Studio IDE Start page 2.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
ASP.NET The Clock Project. The ASP.NET Clock Project The ASP.NET Clock Project is the topic of Chapter 23. By completing the clock project, you will learn.
Chapter 8 Working With Databases in ASP.NET. Listing 8.1 – ShowListControls Uses The SqlDataSource control for estabishing database connectivity and.
Use CSS to Implement a Reusable Design Selecting a Dreamweaver CSS Starter Layout is the easiest way to create a page with a CSS layout You can access.
TRAINING SESSIONS.NET Controls.  Standard Controls  Label  Textbox  Checkbox  Button, Image Button, Image control  Radio Button  Literal  Hyperlink.
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.
Reference: “ASP.NET 2.0 Illustrated” by Alex Homer and Dave Sussman. -ch3 illustrated book
CSE 409 – Advanced Internet Technology Today you will learn  Styles  Themes  Master Pages Themes and Master Pages.
Tutorial 3 Adding and Formatting Text with CSS Styles.
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
1 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 12 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 12 Accessing.
ADO.NET FUNDAMENTALS BEGINNING ASP.NET 3.5 IN C#.
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
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 8 1 Microsoft Office Access 2003 Tutorial 8 – Integrating Access with the.
21 Copyright © 2009, Oracle. All rights reserved. Working with Oracle Business Intelligence Answers.
Module 10: Data Access in ASP.NET. Overview Overview of the ASP.NET Data Access What is Data Access List of Data Source Control What is Data Bound How.
11 User Controls Beginning ASP.NET in C# and VB Chapter 8.
CHAPTER 7 LESSON C Creating Database Reports. Lesson C Objectives  Display image data in a report  Manually create queries and data links  Create summary.
Create and edit web pages 4
Positioning Objects with CSS and Tables
ASP.NET Web Controls.
Microsoft Office Access 2003
Microsoft Office Access 2003
Using Cascading Style Sheets (CSS)
Building ASP.NET Applications 2
5.00 Apply procedures to organize content by using Dreamweaver. (22%)
Positioning Objects with CSS and Tables
Presentation transcript:

User Controls, Master Pages, GridView

Content User Controls Styles, Themes, Master Pages Working with Data GridView Muzaffer DOĞAN - Anadolu University2

User Controls An efficient way to reuse a block of user interface A key tool for building modular web applications They help you create consistent website designs and reuse your hardwork In ASP.NET, extension of user control files are.ascx They can use a code-behind file with event-handling logic Muzaffer DOĞAN - Anadolu University3

Differences Between User Controls and Web Pages Extensions (.ascx and.aspx) Beginning directive ( and ) User controls can't be requested directly by a web browser. Instead, they must be embedded inside other web pages Muzaffer DOĞAN - Anadolu University4

Creating User Controls In Visual Studio, use Add New Item command and select Web User Control Design user control like a web page. Muzaffer DOĞAN - Anadolu University5

Embedding a User Control Simplest way: Drag & drop user control from Solution Explorer into a web page Hard way: 1) Use Register directive at the top of the web page: 2) Call it using the following tag: Example: Display date and time (will be shown in the class) Muzaffer DOĞAN - Anadolu University6

Integrated User Controls There are two types of user controls: Independent and Integrated Independent user controls don't interact with the page Integrated user controls interact with the web page that hosts them You can change the behavior or look of an integrated user control Example: Displaying time in long date or short time formats (will be shown in the class) Muzaffer DOĞAN - Anadolu University7

Changing Behavior Create a Property in the user control and change its value by code or by control tag. 1) Changing by code: Footer1.Format = Footer.FooterFormat.LongDate; Note that user control's Page_Load event runs before the click event of a button in the web page 2) Setting initial appearance in the control tag: Advanced: You can also use events in order to interact between user control and the web form Muzaffer DOĞAN - Anadolu University8

Styles Formatting features of HTML are limited and inconsistent. The solution is the CSS standard. CSS is supported by all modern browsers. Styles allow you to add borders, set font details, change colors, add margin space and padding, and so on. Muzaffer DOĞAN - Anadolu University9

Style Types Inline style: Placed directly inside an HTML tag Internal style sheet: Placed in the section External style sheet: Places in a separate CSS file For more information about styles and style sheets, visit Muzaffer DOĞAN - Anadolu University10

Themes CSS rules are limited to a fixed set of style attributes. CSS rules can't control other aspects of ASP.NET controls. For example, CheckBoxList control includes properties that control how it organizes items into rows and columns. They are outside the scope of CSS. The themes feature fills this gap. Themes are processed by the server. Muzaffer DOĞAN - Anadolu University11

Using Themes Themes should be placed in the folder App_Themes You need to create at least one skin file in the App_Themes folder A skin file is a text file with the.skin extension For more information, refer to the textbook Muzaffer DOĞAN - Anadolu University12

Master Pages Master pages allow you to define page templates and reuse them across your website. Master pages define the page structure and the common ingredients. Extension of master pages is.master. Master pages can't be viewed by browsers. Instead, they must be used by other web pages Muzaffer DOĞAN - Anadolu University13

Master Page and Content Page To add a master page, click Add New Item and select Master Page. ContentPlaceHolder is the portion of the master page that a content page can change. While adding web forms into your application, don't forget to check Select master page box and select the master page you want to use. You can use ContentPlaceHolders more than one in a master page. Muzaffer DOĞAN - Anadolu University14

Working with Data ADO.NET is the technology that.NET applications use to interact with a database. There are two ways to work with data. The first way is using the facilities presented by Visual Studio. The second way is writing everything in the code by hand. In this class, we'll see only the first way, which is easier than the other. Muzaffer DOĞAN - Anadolu University15

Controls about Data Access In Data section of Toolbox of Visual Studio, there are two types of controls: Controls to display data GridView, DataList, DetailsView, FormView, ListView, Repeater Controls to access data SqlDataSource, AccessDataSource, LinqDataSource, ObjectDataSource, XmlDataSource, SiteMapDataSource Muzaffer DOĞAN - Anadolu University16

Data Access 1) Design the database. You can use SQL Server, Access, XML, Oracle, etc. 2) Place appropriate data source (i.e. AccessDataSource if you are using Access, or SqlDataSource if you are using SQL Server, etc.) into your web page and configure it. 3) Place appropriate display control (GridView, DataList, etc.) and set its DataSource property. Muzaffer DOĞAN - Anadolu University17

Data Source Controls Data source controls (AccessDataSource, SqlDataSource, etc.) have four commands: SelectCommand to retrieve records UpdateCommand to modify existing records InsertCommand to add a new record DeleteCommand to delete existing records These commands can take parameters from controls, session state, cookies, and query strings. Muzaffer DOĞAN - Anadolu University18

GridView Control The GridView is an extremely flexible grid control that displays a multicolumn data. Each record in your data source becomes a separate row in the grid. Each field in the record becomes a separate column in the grid. GridView has automatic paging, sorting, selecting and editing features. Muzaffer DOĞAN - Anadolu University19

GridView Columns GridView can automatically generate its columns based on the data. You can hide columns, change their order, or configure some aspect of their display, such as formatting or heading text. You can display columns as BoundField, ButtonField, CheckBoxField, CommandField, HyperLinkField, ImageField, or TemplateField Most basic type is BoundField and you can display a field as a text in the specified column. Muzaffer DOĞAN - Anadolu University20

.:..:. Application.:..:. There will be an application session in the class demonstrating data access using an Access database and a GridView If you were absent in the class, get help from one of your friends that attends to the class. Muzaffer DOĞAN - Anadolu University21

References Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional Visual Studio Muzaffer DOĞAN - Anadolu University22