ASP.NET Web Controls.

Slides:



Advertisements
Similar presentations
11 Getting Started with ASP.NET Beginning ASP.NET 4.0 in C# 2010 Chapters 5 and 6.
Advertisements

Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
 2002 Prentice Hall. All rights reserved. Chapter 2 - Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Overview of the Visual Studio.NET.
1 Introduction to the Visual Studio.NET IDE Powerpoint slides modified from Deitel & Deitel.
IT 533 Lecture Notes Gül ş en Demiröz Introduction to Web Programming using ASP.NET.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
ASP.Net, Web Forms and Web Controls 1 Outline Introduction Simple HTTP Transaction System Architecture Creating and Running a Simple Web Form Example Web.
Building an ASP.NET Web Application Dr. Awad Khalil Computer Science & Engineering Department AUC.
 Using Microsoft Expression Web you can: › Create Web pages and Web sites › Set what you site will look like as you design it › Add text, images, multimedia.
Chapter 4 Dreamweaver: Part II The Web Warrior Guide to Web Design Technologies.
Hello World In C++ and Microsoft Visual C++. Directions to begin a project 1. Go to All Programs 2. Open Visual Studio C++ 3. Click on New Project 4.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
Web Technologies Website Development Trade & Industrial Education
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introducing Web Controls Outline 29.1 Analyzing the.
IE 411/511: Visual Programming for Industrial Applications
Chapter 9 Programming with Web Forms Programming In Visual Basic.NET.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
Website Development with Dreamweaver
IT 533 Lecture Notes Introduction to Web Programming using ASP.NET.
XP Dreamweaver 8.0 Tutorial 3 1 Adding Text and Formatting Text with CSS Styles.
CSCI 6962: Server-side Design and Programming Introduction to Active Server Pages.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved. 1 3 Welcome Application Introduction to Visual Programming.
Introduction to Web Services. Examples Using a Web Service Creating a new Web Service.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
Tutorial 3 Adding and Formatting Text with CSS Styles.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Bookstore Web Application: Client Tier Introducing Web Controls.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Using CSS to Create Some Style Module 5: Beyond the Basics with Expression Web LESSON 5.
11 Getting Started with ASP.NET Beginning ASP.NET in C# and VB Chapters 1 and 2.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
© Ms. Masihi.  A Web page contains text and images that convey specific information to viewers.  To create a new web page, open Dreamweaver and select.
C# Programming: From Problem Analysis to Program Design1 Visual Studio Configuration C# Programming: From Problem Analysis to Program Design 4th Edition.
MIS 3200 – C# (C Sharp)
Visual Basic.NET Windows Programming
Dreamweaver – Setting up a Site and Page Layouts
ASP.NET Forms.
Objective % Select and utilize tools to design and develop websites.
OVERVIEW Objectives Follow a design document to create a small personal Web site Follow a design document to create pages in a large commercial Web site.
Microsoft Visual Basic 2005 BASICS
Chapter 1: An Introduction to Visual Basic 2015
Learning the Basics – Lesson 1
21 ASP.NET 2.0, Web Forms and Web Controls.
Chapter 2 – Introduction to the Visual Studio .NET IDE
ASP.NET Web Controls.
3.01 Apply Controls Associated With Visual Studio Form
1. Introduction to Visual Basic
How to design a Windows Forms application
3.01 Apply Controls Associated With Visual Studio Form
Objective % Select and utilize tools to design and develop websites.
Introduction to the Visual C# 2005 Express Edition IDE
Unit I: Collecting Data with Forms
Web Development in Microsoft Visual Studio 2013
Social Media And Global Computing Introduction to Visual Studio
Chapter 2 – Introduction to the Visual Studio .NET IDE
Tutorial 6 Creating Dynamic Pages
Exercise 8 – Software skills
Key Applications Module Lesson 12 — Word Essentials
Cascading Style Sheets™ (CSS)
ASP.NET.
Introduction to Web Programming using ASP.NET
Chapter 9 Programming with Web Forms
Exercise 24 – Software Skills
Key Applications Module Lesson 12 — Word Essentials
Programming with Microsoft Visual Basic 2008 Fourth Edition
Presentation transcript:

ASP.NET Web Controls

Learning Outcomes Designing Web page. Understanding asp.net Web controls. Understanding absolute and relative positioning. Running a Web page and Web site.

Designing the Page To add controls to the page, you can drag and drop them from the Toolbox onto the Web Form in Design mode. Like the Web Form itself, each control is an object that has properties, methods and events. You can type text directly on a Web Form at the cursor location or insert XHTML elements using menu commands.

Toolbox in Visual Web Developer Figure 1 (a) displays the beginning of the Standard list of web controls. Figure 1 (b) displays the remaining web controls, as well as the list of Data controls used in ASP.NET. Fig. 1 | Toolbox in Visual Web Developer.

Web Controls Controls and other elements are placed sequentially on a Web Form. The cursor indicates the point at which text and XHTML elements will be inserted. You can drop the control at a specific position within the existing elements and rearrange existing controls using drag-and-drop actions.

Fig. 2 | Commonly used web controls. Figure 2 summarizes several web controls. Fig. 2 | Commonly used web controls.

Web Controls (Cont.) The positions of controls and other elements are relative to the Web Form’s upper-left corner. This type of layout is known as relative positioning. An alternate type of layout is known as absolute positioning, in which controls are located exactly where they are dropped on the Web Form. You can enable absolute positioning in Design mode in the HTML Designer > CSS Styling node of the Options dialog.

Portability Tip Absolute positioning is discouraged, because pages designed in this manner may not render correctly in different browsers or on computers with different screen resolutions and font sizes. This could cause absolutely positioned elements to overlap each other or display off-screen, requiring the client to scroll to see the full page content.

Creating and Running a Simple Web-Form Example To add the text to the Web Form, click within the gray rectangle at the top of the Web Form in Design mode. Type Current time on the web server:. Visual Web Developer is a WYSIWYG (What You See Is What You Get) editor—the IDE converts changes made in Design mode into markup. Highlight the text you added. From the Block Format drop-down list, choose Heading 2. Finally, click to the right of the text and press the Enter key to move the cursor to a new paragraph. The IDE should now look like Fig. 1.

Fig. 1| WebTime.aspx after inserting text and a new paragraph. Block Format drop-down list Cursor position after inserting a new paragraph by pressing Enter Fig. 1| WebTime.aspx after inserting text and a new paragraph.

Creating and Running a Simple Web-Form Example (Cont.) Place a Label on a Web Form either by dragging and dropping or by double clicking the Toolbox’s Label control. Using the Properties window, set the (ID) property of the Label to timeLabel. Delete timeLabel’s text, because we set it programmatically in the code-behind file. When a Label does not contain text, the name is displayed in square brackets in the Web Forms Designer (Fig. 2).

Creating and Running a Simple Web-Form Example (Cont.) Set timeLabel’s BackColor, ForeColor and Font-Size properties to Black, Yellow and XX-Large, respectively. Set the Label’s EnableViewState property to False. Finally, select DOCUMENT from the drop-down list in the Properties window and set the Web Form’s Enable­SessionState property to False.

Fig. 2| WebTime.aspx after adding a Label and setting its properties.

Adding Page Logic Open WebTime.aspx.cs by double clicking its node in the Solution Explorer. Add a Page_Init event handler to the code-behind file. Page_Init programmatically sets the text of time­Label to the current time on the server.

Running the Program You can view the Web Form several ways. You can select Debug > Start Without Debugging, which runs the application by opening it in a browser window. To debug your application, you can select Debug > Start Debugging. You cannot debug a web application unless debugging is explicitly enabled by the web.config file. To view a specific ASPX file, you can right click either the Web Forms Designer or the ASPX file name and select View In Browser. Finally, you can run your application by opening a browser window and typing the web page’s URL in the Address field.

Running the Program (Cont.) ASP.NET compiles your web page whenever it changes between HTTP requests. You can manually compile a web page or an entire website by selecting Build Page or Build Site, respectively, from the Build menu.

Windows Firewall Settings For security reasons, Windows Firewall does not allow remote access to a web server on your local computer by default. You can change this using the Windows Firewall utility in the Windows Control Panel.