ASP NET Programming Notes
ASP NET Programming Notes
ASP NET Programming Notes
TERM
Active Server Pages (pg.2)
Server-side include pages (pg.2)
aka User Controls (pg.5)
Web forms (pg.3)
Web services (pg.3)
HTML Template (pg.4)
EXAMPLES
End with file extension .inc or .asp
End in .aspx
End in .asmx
NOTE: Most HTML books refer to controls as tags or elements. Within ASP.NET these are known as HTML controls
Server controls
ASP.NET Form controls
Literal Controls
Object-oriented programming
Object
Properties
Decision Control
Structures
Procedural Code
Module
Class
Instantiation
Class Definitions
Public
Private
Subclasses
Friend
Inheritance
Inherits
Encapsulation
Abstraction
Polymorphism
Variables (pg.207)
Declaring
Option Explicit
Option Strict
Assignment Operator (=)
Constants (pg.210)
Can interact with other objects outside of its own base class
Can only be called within the base class
Used to create a class that inherits from the base class
Declared procedures and properties that can be called from
anywhere.
Allows you to derive the interface and behaviors from another class
Allows you to derive the interface and behaviors from another .NET class
Inner workings of the object are maintained within the object
Ability to create a concept using code
Ability to create code that can be applied to objects that are derived from different
classes
Used to store data than can be retrieved at another time
Process of reserving memory space for the variable before it is used in the program
Forces a program or page to declare 1. <%@Page Option Explicit = true %>
all variables before they can be used 2. For HTML use; put in top of page
3. Can also be place in Web.config makes
all pages inherit this property
Halts any conversion that would
1. <%@ option strict %>
result in data loss
Assigns a value to a variable
Use Const instead of Dim for values that will NOT change, names are all
Concatenation (pg.211)
Reference Types (pg.211)
Value Types (pg.211)
Garbage collector (pg.212)
Property (page214)
Collection
Request Object (pg.13)
User agent (pg.14)
Query String (pg.14)
Response Object (pg.16)
Write Method (pg.16)
WriteFile Method (pg.16)
Caching (pg.16)
Redirecting (pg.16)
Localhost (pg.17)
Scraping (pg17)
UDDI (pg.18)
Namespace
uppercase.
Joining together of two or more string values
Strings, classes, arrays, collections, and objects, stored in managed heaps,
because the amount of memory required for storage varies
Boolean, Integar, Decimal, Char, and DateTime, data is stored in the stack,
because the amount of memory required for storage is constant.
Part of the Common Language Runtime that allocates and manages memory for
the managed heap.
Used to get and set values.
A container to store variables
Used to get information from the
server, but sends info to the server
about the user & browser
Used to identify client software; also
sends certificate information
Containing name & topic
Used to send info to the browser
Allows you to send a string to the
browser
Allows you to send entire contents
of a text file to the web page.
Process where a page is generated
and stored on a server
Redirects client to another page
Mapped root website default
directory C:\Inetpub\wwwroot
Using a program to view a Website
and capture its source code.
Public registry that contains
registered public web services
A hierarchical way to identify
resources
Response.write(Request.PhysicalPath)
http://www.tarastore.com/index.asp?name=katie&topic=asp
Response.Write(Copyright by TaraStore<br/>)
Response.WriteFile(c:\copyright.txt)
Response.Redirect(http:/www.course.com/)
http://localhost/
www.microsoft.com/uddi
1. All objects must inherit system.object.objectname
2. ASP.NET apps must inherit the System.Web Namespace
3. All webforms must inherit System.Web.UI namespace
4. Webservices must inherit System.Web.WebService
5. System.Web.UI.StateBag
PropertyName: value;
PropertyName: value;
}
Class (pg63)
OnServerChange event (pg.88)
Function (pg.89)
_EVENTTARGET and _EVENTARGUMENT
(pg.89))
XML Files
XSLT Files
Chapter 4 (pg135)
There are NO class files associated
with XLM
There are NO class files associated
with XSLT
Chapter 5 (pg.197)
Sub-Routines
---------------------------------------H1{
Color:green
Size:12
}
File extensions end in .css
<link rel=
Href=http://www.website.com
H1 {color:green} //Green
/* This is a
multi-line
comment
/*
1. In-line style rules
2. embedded style rules
3. external style rules
1.
2.
3.
4.
5.
6.
HTMLInputCheckBox
HTMLInputRadio
HTMLInputHidden
HTMLInputText
HTMLTextArea
HTMLSelect
1.
2.
3.
4.
HTMLInputImage
HTMLAnchor
HTMLButton
HTMLForm
<table> </table>
<tr> </tr>
<td> </td>
Functions
Function FunctionName As
Parameter
FunctionCode
End Funtion
Subroutine ()
On Error Resume Next
End Sub
Structured Error Handling
(Classroom Materials)
ArrayList (pg.216)
()
xsl:attribute
xsl:text
xsl:choose
xsl:when
xsl:otherwise
xsl:sort
xsl:if
xsl:if-else-end
XML Schema
TargetSchema
AdRotator
AdScheduler
Ad tag
Impressions property
Root node
Calendar Control
ChrW(60)
ChrW(62)
File Field Control
Contained in System.Data.dll
System
.
.
.
.
.
.
.
.
.
.
.
.
Data
System
System
System
.
.
.
.
.
.
.
.
Common
OleDb
SqlClient
SqlTypes
Contained in System.XML.dll
XML
Collections
.
.
.
.
.
.
.
.
.
Schema
Serialization
Xpath
Xsl
ArrayList
HashTable
SortedList
Queue
Stack
.
.
.
.
.
.
.
.
.
.
.
.
Array
Web
.
.
.
UI
WebControls
HTMLInput
Control
.
.
.
AdRotator
Calendar
.
.
.
NOTES:
1.
2.
3.
4.
5.
6.
Whatever code you use must inherit from the appropriate namespace
You can import from more than one namespace without causing errors or diminished performance.
Line used to compile code: vbc filename.vb and press enter
* - take the dash out of the path
Webpages contain two hidden fields named _EVENTTARGET and _EVENTARGUMENT
IL DASM stands for Intermediate Language Disassember
Acronyms:
1. ASP Active server pages
2. CLR Common language runtime
3. BCL Base class libraries
4. GC Garbage Collection
5. HTML Hypertext Markup Language
6. DHTML Dynamic HTML combination of JavaScript & cascading style sheets
7. XHTML Extensible Hypertext Markup Language
8. br line break
9. hr horizontal rule
10. UC User Controls
11. ADO Active X Data Objects (Suitable for constant connection between client and server)
12. DAO Data Access Objects (MS Client Server applications, before the internet)
13. RDO Remote Data Objects (Suitable for constant connection between client and server)
14. .xsd XML schema document
Troubleshooting:
1.
I get the following error when trying to create an ASP.net project in VS 2003 Enterprise under Win XP: "Visual Studio .NET
has detected that the specified Web server is not running ASP.NET version 1.1. You will be unable to run ASP.NET Web
applications or services." I have tried the following to resolve the problem:
For the schools software it will be regsvr32 C:\Windows\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll
Sources:
Classroom Materials, Unit 4 & 5, (n.d.), taken from http://mycampus.aiu-online.com/classroom/classmaterials.asp?courseid=121&classid=40459&tid=37&LetterCode=
, on Tuesday, April 06, 2004
Daniel L. McGrew, (n.d.), Personal Experience
Kathleen Kalata, (2003), Introduction to ASP.NET, Canada