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.

Slides:



Advertisements
Similar presentations
Microsoft Expression Web-Illustrated Unit J: Creating Forms.
Advertisements

11 Getting Started with ASP.NET Beginning ASP.NET 4.0 in C# 2010 Chapters 5 and 6.
Unauthorized Reproduction Prohibited SkyPoint Alarm Integration Add-On Using OnGuard Alarms to create events in SkyPoint Also called ‘SkyPoint V0’ CR4400.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 1 Tariq Aziz and Kevin Jones.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Building ASP.NET Applications 2 Lecture 3,4 T. Ahlam Algharasi 4 th Level.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 14: Advanced Topics: DBMS, SQL, and ASP.NET
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Tutorial 10 Adding Spry Elements and Database Functionality Dreamweaver CS3 Tutorial 101.
Advanced Web Design Scripting Tutorial Chapters. Scripting Intro The scripting part of the forthcoming Advanced Web Design textbook introduces you to.
10-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
WaveMaker Visual AJAX Studio 4.0 Training Authentication.
Creating a Web Site to Gather Data and Conduct Research.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
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.
Credit Union National Association Installing and Uploading Project Zip Code.
CSCI 6962: Server-side Design and Programming Introduction to Active Server Pages.
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.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
1 Working with MS SQL Server Textbook Chapter 14.
C# Tutorial -1 ASP.NET Web Application with Visual Studio 2005.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
Installing and Using MySQL and phpMyAdmin. Last Time... Installing Apache server Installing PHP Running basic PHP scripts on the server Not necessary.
Unit 8.3 Learning Objectives Insert users into the ASP.NET Membership system from code Capture data being sent to the database Capture Exceptions that.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
Diagnostic Pathfinder for Instructors. Diagnostic Pathfinder Local File vs. Database Normal operations Expert operations Admin operations.
1 CS 3870/CS 5870: Note 07 Lab 3 Lab 4 Test 1: Two Tables.
Microsoft Access 2010 Chapter 10 Administering a Database System.
Chapter Thirteen Working with Access Databases and LINQ Programming with Microsoft Visual Basic th Edition.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview How to create a first ASP.NET application.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Bookstore Application: Middle Tier Introducing Code-Behind Files, Session State.
Chapter Fourteen Access Databases and SQL Programming with Microsoft Visual Basic th Edition.
BlackBerry Applications using Microsoft Visual Studio and Database Handling.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
Introduction to KE EMu
Module 4: Creating a Web Application with Web Forms
1 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 12 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 12 Accessing.
Introduction to KE EMu Unit objectives: Introduction to Windows Use the keyboard and mouse Use the desktop Open, move and resize a.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Introduction to KE EMu Unit objectives: Introduction to Windows Use the keyboard and mouse Use the desktop Open, move and resize a.
ADO.NET FUNDAMENTALS BEGINNING ASP.NET 3.5 IN C#.
Create the Basic Test USINGQTP65-STUDENT-01A. QuickTest Professional Workflow Gather relevant test information What are the test requirements? Where can.
1 Database Programming with ADO.NET Kashef Mughal.
ADO.NET Objects Data Adapters Dr. Ron Eaglin. Agenda Builds on Information in Part I Should have working knowledge of creating a database connection Continuation.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
A Mobile Library Management System Advisor: Dr. Shen Student: Ananta Gampaa November 8 th,2005.
Navigation: If the tutorial opens up in your web browser, simply click your mouse to advance to the next slide. Use the “Backspace”
1 Working with MS SQL Server Beginning ASP.NET in C# and VB Chapter 12.
Working with ASP.NET Controls What is ASP.NET Using server controls in your pages Allowing users to create their own accounts Creating a login page Letting.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 11 Creating Web Applications and Writing Data to a Database.
ASP.NET Programming with C# and SQL Server First Edition
Unit 7 Learning Objectives
ASP.NET Web Controls.
Part 1 of 2 Creating SQL Database and Binding to GridView
Visual programming Chapter 1: Introduction
Module 10: Creating a Web Application with Web Forms
Programming with Microsoft Visual Basic 2008 Fourth Edition
Security - Forms Authentication
Presentation transcript:

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 your way around Visual Studio.NET. Chapter 23 After launching the development environment for the first time, you will explore its windows and practice using controls that enable you to create, edit, run, and debug an application. Let us work through the clock project together.

Creating an ASP.NET Project Put Visual Studio.NET on your Windows taskbar to start it up quickly. Create a new project with Visual Studio.NET. Understand what is meant by the term Web Form.

The Clock Script Create an ASP.NET page that tells the time. In HTML view, we write the following code: The Clock Strikes The time is

Running an ASP.NET Project Use the start button to run a project. Debug a project containing errors. Understand how actions you take in Design View change the code in HTML View.

Using the Toolbox Open the toolbox and drag controls onto the design surface. Modify properties of controls on the design surface. Discover how the design surface uses absolute positioning to place objects on screen. Illustrate this by creating an Update button.

ASP.NET Top Secret Project Part 6: Goals and Objectives The Top Secret Project is the topic of Part 6 of Advanced Web Design. It enables you to look further under the hood of ASP.NET. You learn how to create a database with Microsoft Access or SQL Server, populate the database with user names and passwords, and use ADO.NET to decide who can access your site.

Top Secret Project Chapter 24: Creating the Database Chapter 24Chapter 24 gets you started by having you use either Microsoft Access or SQL Server to create the Top Secret database. You make a Users table that will contain the names and passwords of your users. You populate the database with a few users allowed to access your top secret stuff.

Top Secret Project Chapter 25: Listing the Users In Chapter 25, you write an ASP.NET script that reads information from the Top Secret database and displays it in a listbox on a Web page.Chapter 25 The design process you follow in this chapter will teach you how to use a code-behind page to separate your programming from the Web page. You will call upon the assistance of the Code Designer to help you create the code-behind page, on which you will write a little program that uses a data adapter to connect to a database. After issuing an SQL query that fills a dataset with the names of your Top Secret users, you will read from the dataset and load into the listbox the name of each user permitted access to the Top Secret database.

Top Secret Project Chapter 26: Adding New Users At the moment, if you want to add a user to the Top Secret database, you need to use your database software (i.e., Microsoft Access or SQL Server) to do so. Suppose you are at a remote location, away from your server, and the need arises to add another user to the database. Wouldn’t it be nice to have a way to add new users remotely? In Chapter 26, you will add to the Users.aspx Web page an Add User button that enables you to add new users remotely over the Web.Chapter 26

Top Secret Project Chapter 27: Updating Users You need to update a database when information changes in a dataset. Suppose one of your Top Secret users gets a new address, for example. Changing that user’s address requires you to connect to the database, locate the user’s record, change the address in the dataset, and update the database. In Chapter 27, you will learn how to make these kinds of changes in a database.Chapter 27

Top Secret Project Chapter 28: Deleting Users In Chapter 28, you will create a Delete button that will enable you to remove users from the database who no longer should have access to your top secret information.Chapter 28 When you write the code for the Delete button, you will learn the dataset method for deleting records from a database. This will round out the database functions you have learned in this part of this book. By the time you complete this chapter, you will have learned how to insert, update, retrieve, and delete records from a database.

Top Secret Project Chapter 29: Logging Users In Authentication is the process of determining whether a user should be permitted or denied access to a resource such as a Web site. On the Internet, Web sites that are not publicly accessible require users to log in to gain access. In Chapter 29, you will create a login screen for the Top Secret project. The login screen will contain three controls: a text field into which the user will type a user name, a text field into which the user will type a password, and a login button.Chapter 29 When the user presses the login button, a script will gather the name and password from the login form and check to see whether the user should be permitted access. If so, the script will set an authentication cookie that will permit the user to access the Web site. If the name and password are not recognized, on the other hand, the user will be denied access to your top secret stuff.

Top Secret Project Chapter 26: Adding New Users At the moment, if you want to add a user to the Top Secret database, you need to use your database software (i.e., Microsoft Access or SQL Server) to do so. Suppose you are at a remote location, away from your server, and the need arises to add another user to the database. Wouldn’t it be nice to have a way to add new users remotely? In Chapter 26, you will add to the Users.aspx Web page an Add User button that enables you to add new users remotely over the Web.Chapter 26

Top Secret Project Adding a Button To add a button to an ASP.NET page, follow these steps: Drag a button from the WebForms toolbox to the design surface. Edit the button’s properties to give it the text and ID you want it to have. Double-click the button to make the code generator create its handler. Write the script to handle the button.

Top Secret Project Add User Script The add user script performs the following tasks: Get the data from the form. See if the user already exists. Add the new user to the data table. Update the database. Display a feedback message

Top Secret Project Chapter 27: Updating Users You need to update a database when information changes in a dataset. Suppose one of your Top Secret users gets a new address, for example. Changing that user’s address requires you to connect to the database, locate the user’s record, change the address in the dataset, and update the database. In Chapter 27, you will learn how to make these kinds of changes in a database.Chapter 27

Top Secret Project Update User Script The update user script performs the following tasks: Get the user name from the form. Make sure the user name exists. Update the fields in the data table. Update the database. Display a feedback message.

Top Secret Project Chapter 28: Deleting Users In Chapter 28, you will create a Delete button that will enable you to remove users from the database who no longer should have access to your top secret information.Chapter 28 When you write the code for the Delete button, you will learn the dataset method for deleting records from a database. This will round out the database functions you have learned in this part of this book. By the time you complete this chapter, you will have learned how to insert, update, retrieve, and delete records from a database.

Top Secret Project Delete User Script The delete user script performs the following tasks: Get from the form the user name to be deleted. Make sure the user exists. Delete the user from the data table. Update the database. Display a feedback message

Chapter 29: Logging Users In Design the Login.aspx page, which contains four labels, two text fields, and one button. Code and test the Login button. Make the login button set the authentication cookie. Configure the authentication mode in the Web.config file.

Setting the Authentication Cookie To set the authentication cookie, make the code that handles the login button issue the following command if the username and password are valid: System.Web.Security.FormsAuthentication.SetAuthCookie(sUserName, false); False causes the cookie not to get written to the user’s hard drive.

Configuring the Authentication Mode Open the project’s Web.config file. Make the section read as follows: This causes unauthenticated users to get the login.aspx page if they try to access any other page in this app.

Identifying the User When a user has logged on, you can find out the user’s name via the following code: String sUserName = ""; if (HttpContext.Current.Request.IsAuthenticated) sUserName = HttpContext.Current.User.Identity.Name;