Visual Basic.NET Programming March 3, 2004. Agenda Questions / Discussion Cookies Project Work (Ends Around 9:00 PM) Demo's (15 minutes per team)

Slides:



Advertisements
Similar presentations
CIS 451: ASP Sessions and Applications Dr. Ralph D. Westfall January, 2009.
Advertisements

16.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft® Windows® Server 2003 Active Directory Infrastructure.
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
B118 Web Programming Session #9 Client/Server & Cookies April 5, 2004.
Authenticating Users in an ASP.NET Application. Web Site Administration Tool From VS 2008, click Website/ ASP.Net Configuration to open Web Site Administration.
Cookies.NET Security Summer 2006 CS795/895 Hadi Arbabi.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 3-1 of…
Web Site Security ISYS 512/812. Authentication Authentication is the process that determines the identity of a user. Web.config file – node Options: –Windows:
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS 512.
Coding ADO.NET Objects: Connection, Command, DataReader.
More on lists, exceptions, loops and validation. You can use the exception to indicate the error that occurred Private Sub btnCheck_Click(ByVal sender.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
DR.JOHN ABRAHAM PROFESSOR UTPA ASP.NET. ACTIVE SERVER PAGES (ASP) Web application development environment Web applications use web browser to display.
CHAPTER 12 COOKIES AND SESSIONS. INTRO HTTP is a stateless technology Each page rendered by a browser is unrelated to other pages – even if they are from.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Chapter 11 Introduction to Database Processing. Class 11: Database Processing Use a Visual Studio Wizard to establish a database connection used to load.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
IT533 Lectures Session Management in ASP.NET. Session Tracking 2 Personalization Personalization makes it possible for e-businesses to communicate effectively.
ASP.Net Web Applications. Characteristics of a typical data driven web application Web Server HTML Graphics Active-X Java Applets HTTP Request ADO / JDBC.
Advanced Web Forms with Databases Programming Right from the Start with Visual Basic.NET 1/e 13.
Session 10: Managing State. Overview State Management Types of State Management Server-Side State Management Client-Side State Management The Global.asax.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Managing State.
State Management. What is State management Why State management ViewState QueryString Cookies.
© Minder Chen, ASP.NET 2.0: Introduction - 1 ASP.NET 2.0 Minder Chen, Ph.D. Framework Base Class Library ADO.NET: Data & XML.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Securing a Microsoft ASP.NET Web Application.
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.
Chapter 8 Cookies And Security JavaScript, Third Edition.
ASP/ASP.NET: Tricks and Tips How to get Microsoft’s Programming Language to work for you By Wade Tripp Park University
Effective Security in ASP.Net Applications Jatin Sharma: Summer 2005.
Visual Basic.NET Windows Forms Hello World Homework Assignment.
Cookies Web Browser and Server use HTTP protocol to communicate and HTTP is a stateless protocol. But for a commercial website it is required to maintain.
Microsoft Visual Basic 2008 CHAPTER TWELVE Cell Phone Applications and Web Services.
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.
Christopher M. Pascucci Basic Structural Concepts of.NET Managing State & Scope.
ASP.NET State Management. Slide 2 Lecture Overview Client state management options Cookies Server state management options Application state Session state.
Navigation Framework using CF Architecture for a Client-Server Application using the open standards of the web Kedar Desai presented by.
Session and Cookie Management in.Net Sandeep Kiran Shiva UIN:
ADO.NET Objects – Data Providers Dr. Ron Eaglin. Requirements Visual Studio 2005 Microsoft SQL Server 2000 or 2005 –Adventure Works Database Installed.
Module 3: Using Microsoft.NET- Based Languages. Overview Overview of the.NET-Based Languages Comparison of the.NET-Based Languages.
1 CS 3870/CS 5870: Note05 Prog3 Web Application with Database.
JDS – VB.NET Skill Session Fall 2004 Presented by YUHAO LIN.
ASP.Net, Web Forms and Web Controls 1 Outline Session Tracking Cookies Session Tracking with HttpSessionState.
Configuring and Troubleshooting Identity and Access Solutions with Windows Server® 2008 Active Directory®
PHP A very brief introduction PHP1. PHP = PHP: Hypertext Processor A recursive acronym! PHP scripts are executed on the server side Executed by (a plugin.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
HNDIT Rapid Application Development
ASP.NET P AGE O BJECTS.  Each ASP.NET page inherits the PAGE object  The PAGE supplies 3 built in objects:  REQUEST: All information passed to the.
Security E-Learning Chapter 08. Security Control access to your web site –3 Techinques for Identifying users Giving users access to your site Securing.
INT213 INT213 – Managing Windows with VBScript VBScript Variables ASP State Management.
Using ADO.Net to Build a Login System Dr. Ron Eaglin.
1.NET Web Forms Applications: Main Form © 2002 by Jerry Post.
XML Web Services Tuc Goodwin 2/9/ Agenda What is an XML Web Service? Web Services Business Benefits Changing Application Architectural Model Web.
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.
Overview of Previous Lesson(s) Over View  ASP is a technology that enables scripts in web pages to be executed by an Internet server.  ASP.NET is a.
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
Sessions and cookies (part 2) MIS 3501, Fall 2015 Brad N Greenwood, PhD Department of MIS Fox School of Business Temple University 11/19/2015.
Navigation Framework using CF Architecture for a Client-Server Application using the open standards of the Web presented by Kedar Desai Differential Technologies,
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
ASP.NET Programming with C# and SQL Server First Edition
Sessions and cookies (part 2)
VB.NET Using Database.
Session management.
HTML5 and Local Storage.
Web Development Using ASP .NET
Coding ADO.NET Objects: Connection, Command, DataReader
SharePoint services Provides team collaboration through SharePoint Sites and makes it easy for communities to work together on documents, tasks, contacts,
Presentation transcript:

Visual Basic.NET Programming March 3, 2004

Agenda Questions / Discussion Cookies Project Work (Ends Around 9:00 PM) Demo's (15 minutes per team)

Questions All homework homework due by Friday. Web Site will remain available for awhile, if not, contact me, I'll have the material. a tip... use the Microsoft Web Site Advanced Search to look up errors. I think it works half of the time.

Cookies

Cookies are a way to save information on the client machine between web page requests. A cookie is a name/value pair that the browser saves on behalf of the application. Cookies are keyed to the domain of the application. When a browser requests a page it automatically transmits the cookies that belong to that domain as part of the request. The application then reads the cookies and takes appropriate action.

Cookies Cookies are generally used in two ways. 1.To save some sort of user identifying information about the user, so that when the returns to a given site, the application knows who the user is. 2.The other is to save information indicating the application's state between web page requests within a single session. Although any information can be saved in a cookie, best practice is to use some sort of key to look up the actual information of the server.

Cookies Cookies are created by adding items to the Cookies collection of the ASP.NET Response object (available through the Response property of the Page Class). Example Dim cookie as HttpCookie cookie = New HttpCookie("MyCookie","MyCookieValue") Response.Cookies.Add(cookie)

Cookies Cookies are read from the Cookies collection of the ASP.NET Request object (available through the Request property of the Page Class). Example Dim cookie as HttpCookie cookie = Request.Cookies("MyCookie") Label1.Text = cookie.Value

HttpCookie Properties Domain – the domain associated with the cookie (string). Expires – date and time the cookie expires (datetime). HasKeys – whether the cookie as subkeys (boolean). Item – old ASP way of accessing subkeys, indexed by subkey name. Name – the name of the cookie (string). Path – the path associated with the cookie (string). Secure – does the cookies require a secure transmission (boolean). Value – the value of the cookie (string). Values – if the cookie as subkeys, Values represents an instance of a NameValuesCollection.

Topics Covered in the Visual Basic.NET Programming Course

Console Application Command Window Console Application

Windows Form Class Input Screen Windows Form Application

Constructors Fields Get Set Properties Methods Windows Form Class Class Input Screen Windows Form with Class DLL

Database Constructors Fields Get Set Properties Methods Windows Form Class Class Input Screen Windows Form, Class DLL, and ADO

WebForm Class Browser (IE6) WebForm Application Code Behind File

Database Constructors Fields Get Set Properties Methods WebForm Class Class Browser (IE6) WebForm, Class DLL, and ADO Code Behind File

Database Constructors Fields Get Set Properties Methods WebForm Class Class Browser (IE6) Web Services using localhost Code Behind File SOAP

Database Constructors Fields Get Set Properties Methods WebForm Class Class Browser (IE6) Web Services using Remote Host Code Behind File ClientServer SOAP

Web Form Client Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.text = "" Try Dim obj As New Service1 Dim ds As New DataSet Dim str As String = "Select * from NameAddress" ds = obj.ServiceGetDataSet(str) DataGrid1.DataSource = ds DataGrid1.DataBind() Catch ex As Exception Label1.text = ex.Message End Try End Sub

Web Service _ Public Function ServiceGetDataSet(ByVal SQLStmt As String) As DataSet Try Dim obj As New CDatabase Dim ds As New DataSet obj.SQLString = SQLStmt If obj.GetDataSet(ds) Then Return ds End If Catch ex As Exception Dim se As New SoapException("Fault occurred - " + ex.Message, SoapException.ClientFaultCode) Throw se End Try End Function

Database Class Notes Don't name everything DatabaseClass Name the Project  DatabaseClass Name the.vb module  DBClass Name the class  Cdatabase Check the project properties to determine the imports name to use in the application

Database Class Private cn As New OleDbConnection() Private adpt As New OleDbDataAdapter() Private m_SQLString As String Public Sub New() End Sub Public Property SQLString() Get Return m_SQLString End Get Set(ByVal Value) m_SQLString = Value End Set End Property

Database Class Public Function GetDataSet(ByVal ds As DataSet) As Boolean Try If Not OpenConnection() Then Throw New ApplicationException("Connection Open Failure") End If adpt = New OleDbDataAdapter(m_SQLString, cn) adpt.Fill(ds, "Messages") adpt.Dispose() Catch ex As Exception Throw New ApplicationException("Database Error - " + ex.Message) Finally cn.Close() cn = Nothing End Try Return True End Function

Database Class Private Function OpenConnection() As Boolean Try If cn.State <> ConnectionState.Open Then cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\...\Guestbook.mdb" cn.Open() Return True End If Catch ex As Exception Throw New ApplicationException("Connection Failure - " + ex.Message) End Try End Function