0% found this document useful (0 votes)
59 views

Chapter 1: An Introduction To: Liu, Jie

This document provides an introduction to ASP.NET web programming. It discusses the client/server model used in web applications and how ASP.NET pages can be static or dynamically generated. Dynamic pages are formed according to requests and can maintain state between page loads using various methods. The document also overview the .NET framework structure and common languages like VB, C#, and J++ that can be used to build ASP.NET applications.

Uploaded by

Magda Tsintsadze
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Chapter 1: An Introduction To: Liu, Jie

This document provides an introduction to ASP.NET web programming. It discusses the client/server model used in web applications and how ASP.NET pages can be static or dynamically generated. Dynamic pages are formed according to requests and can maintain state between page loads using various methods. The document also overview the .NET framework structure and common languages like VB, C#, and J++ that can be used to build ASP.NET applications.

Uploaded by

Magda Tsintsadze
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 10

Chapter 1: An Introduction To

ASP.NET Web Programming


Liu, Jie
Professor
Department of Computer Science
Western Oregon University
[email protected]
Web Applications
 The Client/Server model -- a computation model for PCs to connect to
other computers, like the monitor and mainframe architecture model.
• Client –sends a request
 Thin client
 Thick client
• Server – answers the requests
 For Web based applications
• Communication are through HTTP (hypertext Transfer Protocol)
 What is a protocol
• Client is a browser such as IE (Internet Explorer)
• A browser displays pages defined using HTML tags (Hypertext, Markup
Language)
 Static pages – not going to change
 Dynamic pages – formed dynamically according to the requests
• The application itself is defined on a web server such as IIS (Internet
Information Services), with in turn may interact with other server such as a
Database Management System (DBMS) that is hosted on a database
server
Web Applications

http://sundown.wou.edu:81/en/mail.html?lang=en&laurel=on&cal=1

Domain name Port


Page/file Parameter #1
Protocol Path
Start of parameters Parameter #2
Dynamic Pages

 A dynamic page is generated each time it is called


 The same page may be posted back to the server for
processing.
 Nevertheless, the page itself is stateless, i.e., it will not
maintain the value of a variable between each loading of
the page
More About State
 “State” refers to the values of a variable or object
 Variables in a web page is stateless meaning that
they do not “remember” their previous values
 Methods used to maintain a variable’s state
include
• Use view state
• Use session or application state object
• Using static variable (C# feature)
• Use cookie
• Use database
(show Website 3 example and Visual Studio)
A Closer Look at the example
 The .ASPX page
• Page directives
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
AutoEventWireup allows Page_Load linked with page load event and
called when the page is loaded
 The .ASPX.CS page

using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
……
if (IsPostBack)
……
A Closer Look at the example
 More about the Visual Studio in coming chapters
 A page and a page behind it (separation of
presentation and business logic)
 Controls, properties, and events
 If I change nTemp to be a static variable, what will
happen?
 Different between design view and source view
The .Net Framework Structure
Remote Systems
Remote users Over Internet
Local users
over Internet
Any Hardware/OS Traditional Window
Any Browser application

.Net Framework

ASP.NET
Windows Forms
Web Forms Web Services Controls Windows Application Services
Application Services

.Net Compliant Programming Languages **


VB.NET, C++, C#, J++, etc

.Net Framework Class Library

Common Language Runtime


Operating System
Windows 2000/2003/NT/98/ME/XP and may be other OSs
VB, C#, and J++
// Declare and initialize a string.string 
strFruit = "oranges,apples,peaches,kumquats,nectarines,mangos";
// Declare an array.
string[] arrFruit;
// Place each word in an array element.
arrFruit = strFruit.Split(new Char [] {',', '.', ':'});
// Sort the array.
System.Array.Sort(arrFruit);
// Put the sorted array back in the string.
strFruit = System.String.Join(" ", arrFruit);
Summary
 Have general understanding about the following
• Web applications
• Web page
• Stateless
• ASP.NET components (IIS, frame work, CLR, etc)
• Client/Server
• Dynamic pages
• URL
 Helpful web sites
• www.msdn.microsoft.com
• www.Asp.net

You might also like