Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/198

Click to flip

198 Cards in this Set

  • Front
  • Back
Ch 1
ASP.Net compilation?
ASP.Net pages are compiled into a class before execution.
Ch 1
Directives?
Specify settings used by the page compiler when it processes the .Net pages.
Ch 1
.net user interface and business logic
separation of GUI and business logic
AKA code-behind
Ch 1
code behind?
The concept of separating GUI and business logic
Ch 1
Event handling?
enables a class to notify other classes when something of interest happens.
Ch 1
Raising the event?
The process of one class generating an event notification for another class.
Ch 1
handle?
When an object takes some action in response to another event.
Ch 1
3 features of the .Net Development environment
1) Consistent Development Model
2) Robust Execution Development
3) Support for Standards (XML, SOAP, CLI)
Ch 1
2 main components of the .Net framework
1) CLR
2) FCL (Framework Class Library)
Ch 1
CLR
provides a managed, language agnostic environment for running apps
Ch 1
4 services provided by CLR to code?
1) Compilation
2) Code safety verification
3) Code execution
4) Automatic Memory management
Ch 1
Managed Apps?
Apps run under the CLR
Ch 1
CLR is based on what?
CLI (Common Language Infrastructure)
Ch 1
CLI provides what?
A rich type system
Ch 1
5 compilers provided by MSFT?
1) C#
2) VB.Net
3) Managed C++
4) Jscript.Net
5) Java.Net
Ch 1
CLI compliant compilers compile the source to what intermediate format? when? using what
CIL (common intermediate language)
As run time
Using Just In Time compiling
Ch 1
Framework Class Library?
Collection of Reusable types allowing you to develop a variety of apps
Ch 1
How is FCL organized?
Into hierarchical namespaces
Ch 1
What is in the .Net framework SDK? 5 things
1) .Net framework
2) Language Compilers (command line)
3) Tools and debuggers VB, C#, JScript, non-optimizing C++
4) Tools and Debuggers
5) Documentation
Ch 1
5 important parts of VS.Net?
1) IDE (development, compilation, debugging, and deployment)
2) Editing tools
3) Integrated Debugging
4) Deplyment Tools
5) Automation
Ch 1
Classes?
ecapsulates field, property, methods, and events for a user defined type
Ch 1
What is an object?
An instance of a class.
Created from class blueprint, but PHYSICALLY exist in memory
Ch 1
Where will an objects members be created?
In the HEAP, and just stores a pointer to that memory.
Ch 1
Reference types?
Another name for classes, because they use pointers
Ch 1
Value type?
In vb.net, similar top reference type however they don't use a pointer to store data. They simply store the data directly
Ch 1
Difference betwixt Properties and Fields?
Property is not a storage location, but rather a set of accessors that contain code to be executed when the property value is read or written.
This allows properties to preprocess data before it is read or written.
Ch 1
Inheritance
Allow you to create new types based on existing types
Ch 1
Base class?
In INHERITANCE, it's the original type used to create the DERIVED CLASS
Ch 1
Derived class?
In INHERITANCE, it's the new type inheriting attributes from the BASE CLASS
Ch 1
STRUCT and inheritance?
STRUCT type values cannot be used for INHERITANCE
Ch 1
Everytype is derived from what?
The Object class of the System namespace
Ch 1
How many base classes can a derived class have in VB.Net?
ONLY 1
Ch 1
Namespaces
Allow you to avoid confusion and conflicts by logically grouping the many .Net classes
Ch 1
What is the System namespace in the FCL?
Serves as the ROOT NAMESPACE
Ch 1
What are the 2 main parts of the ASP.Net infrastructure?
1) Set of classes and interfaces for enabling communication between browser and web server in the System.Web namespace
2) A RUNTIME HOST to handle web requests. Loads CLR into a process, creates application domains in the process, then loads and executes the code within the application domains.
Ch 1
Namespace and inheritance hierarchy?
Have nothing to do with each other. May inherit accross classes.
Ch 1
Application domains.
Provide a secure unit of processing the isolates running applications. Ensure that code running in one process cannot adversely affect code in another process
Ch 1
Steps to deliver a page? 6 steps
1) IIS identifies it as a .net request and passes it to aspnet_isapi.dll
2) aspnet_isapi.dll passes it to aspnet_wp.exe
3) Compiles aspx into an assembly, creates application domain, and tells CLR to execute the assembly in the domain
4) Assembly uses various classes in FCL to do its job and generate a response
5) Worker process (asp_wp.exe) collects response, creates response packet and passes it to IIS.
6) IIS forwards response back to the client machine
aspnet_isapi.dll?
calls the asp.net worker process
aspnet_wp.exe
ASP.net worker process.
Ch 1
7 Advantages of ASP.NET
1) Enhanced Applications Development Model
2) Rich Class Library Support
3) Performance
4) Scalability
5) Security
6) Manageability
7) Extensibility
Ch 1
Advantage - Enhanced Applications Development Model
1) Treat html elements as objects
2) Maintains states for you
Ch 1
Advantages - Rich Class Library Support
Many classes accessible to any ASP.Net programs
Ch 1
Advantage - Performance (2 things)
Compiled before executed which is better than INTERPRETTED.
Also caching
Ch 1
Advantage - Scalability
Support Web Gardens and Web Farms
Ch 1
Web garden?
Processing is distributed between different processors in a multi-processor computer
Ch 1
Web farm?
Processing is distributed between different computers
Ch 1
Advantage - Security
has access to built in .Net security modes.
Ch 1
2 security modes in .Net?
Forms authentication and Passport authentication
Ch 1
Advantage - Manageability
config files are stored as simply plain text
Most config changes do not require a server restart
Ch 1
Advantage - Extensibility
Can write your own custom components
Ch 1
Solutions and Projects
A project can have many solutions in it
Ch 1
Compilation error messages?
By default, Only displays the full error message when you're running the code from a browser on the IIS server.
Ch 1
vbc.exe?
The VB.Net compiler
Converts the source file to a .dll
Ch 1
What class does a compiled page directly inherit from?
System.Web.UI.Page
Ch 1
How does ASP.Net know whether to compile a page?
It maintains a link between the source and the dll. If the timestamps are different then it RECOMPILES!
Ch 1
What happens if you define a method in between these tags and why:
<% %>
You will get an error.
.net creates everything between those tags as 1 method. You cannot create a method in a method.
Ch 1
What namespaces does the Page class derive from? 3
1) System.Web.UI.TemplateControl
2) System.Web.UI.Control
3) System.Object
Ch 1
5 important things provided by PageClass?
1) State Management
2) Access to intrinsic objects
3) Information about client
4) Access to controls placed on page
5) notifications for handling page level events
Ch 1
Members of Page Class - Application
Returns the application state object for the current HTTP request
Ch 1
Members of Page Class - Cache
Returns the cache object of the application to which the page belongs
Ch 1
Members of Page Class - Client Target
Info about client browser and its abilities
Ch 1
Members of Page Class - Controls
Returns ControlCollection object that represents collection of all page controls
Ch 1
Members of Page Class - EnableViewState
Indicates whether viewstate is maintained
Ch 1
Members of Page Class - Error
(EVENT) Occurs when an unhandled exception happens
Ch 1
Members of Page Class - ErrorPage
(PROPERTY) Specifies error page to redirect client on error
Ch 1
Members of Page Class -
Init
(EVENT) Occurs when page is initialized (first step in the page life cycle)
Ch 1
Members of Page Class -
IsPostBack
(Property) indicates whether the page is loaded on a client postback
Ch 1
Members of Page Class -
IsValid
(PROPERTY) Indicates whether all validation controls on a page succeeded
Ch 1
Members of Page Class -
Load
(EVENT)
Occurs when page is loaded into memory
Ch 1
Members of Page Class - OnError (derived from what class)
(Method) Raises error event. Protected method derived from TemplateControl class
Ch 1
Members of Page Class - MapPath
(METHOD) Returns the actual physical path corresponding to a virtual path
Ch 1
Members of Page Class -
OnInit() (derived from what class?)
(METHOD)
Raises InitEvent. Derived from Control class
Ch 1
Members of Page Class -
OnLoad()
(METHOD) Raises the Load event (protected event derived from control class)
Ch 1
Members of Page Class - OnPreRender()
(METHOD) raises the PreRender event. Protected method derived from the CONTROL class
Ch 1
Members of Page class - onUnload
(METHOD)
Raises the unload event. Protected method derived from the CONTROL class
Ch 1
Members of Page Class - PreRender()
(EVENT) Occurs wen a page is about to render contents
Ch 1
Members of Page Class -
RenderControl()
(METHOD) Outputs content of a page to a HTMLTextWriter object and stores tracing information about the control if tracing is enabled
Ch 1
Members of Page Class -
Request()
(PROPERTY) Returns the request object that contains information about the current HTTP request
Ch 1
Members of Page Class -
Response
reponse object for the current http request
Ch 1
Members of the Page class -
Server
(PROPERTY)
Access to the server objectd associated to the page
Ch 1
Members of the page class -
Session
(PROPERTY)
Returns the session state object applicable for the current HTTP request
Ch 1
Members of the page class - SmartNavigation
(PROPERTY)
Indicates whether smart navigation is enabled for the page
Ch 1
Members of the page class -
Trace
(PROPERTY)
Returns the trace context object for the current HTTP request
Ch 1
Members of the page class -
Unload
(EVENT) occurs when a page is unloaded from memory
Ch 1
Members of the page class -
Validators
(PROPERTY)
Returns a collection of all validation controls contained in a page
Ch 1
Members of the page class -
Visible
(PROPERTY)
Indicates whether the page should be displayed
Ch 1
4 Stages in ASP.Net processing?
1) Page Initialization (init)
2) User code initialization (load)
3) PreRender (prerender)
4) PageCleanup (unload)
Ch 1
declaration of variables and the render blocks
A BIG NO NO! declaration of variables is class level code
Ch1
Directives, where?
can be placed anywhere in page, but usually at the top in <%@ %> tags
Ch 1
8 directives?
1) Assembly
2) Control
3) Implements
4) Import
5) OutputCache
6) Page
7) Reference
8) Register
Ch 1
Assembly directive? 2 things
links an assembly to the web application during compilation.
Similar to /reference switch in vbc.exe
Ch 1
Control directive?
specifies user control related attributes that are used by asp.net compiler when the ascx file is compiled
Ch 1
Import directive?
imports a namespace into the page, user control, or application
Ch 1
outputcache directive?
Controls the output caching of aspx page or ascx file
ch 1
page directive
specifies page related attributes that are used by the .net compiler when the web client requests the aspx page
ch 1
reference directive
indicates a web page or user control that should be compiled and linked during compilation of the aspx page that contains the reference directive (can be aspx or ascx)
Ch 1
register directive
registers a custom server control or user control to be used in an aspx
ch 1
number of page directives allowed?
1 and ONLY 1
Ch 1
aspCompat of page directive
indicates whether page is to be executed using a Single Threaded Apartment model. DEFAULT is false!
Ch 1
autoEventWireUp of page directive
indicates if asp should connect methods with specific names such as Page_Init and Page_load...default TRUE. Pages created using VS.Net, default is FALSE
Ch 1
Buffer of page directive
indicates if http response buffer is enabled. Default is TRUE
ch 1
ClassName of page directive
specifies name for the dynamically generated class file for the aspx
ch 1
ClientTarget of page directive
represents the target user agent according to which page should be rendered
Ch 1
CodePage of page directive
indicates the culture code page value
Ch 1
Compiler options of page directive
indicates the compiler options and switches to be passed to the compiler
ch 1
content tpye of page directive
mime type
ch 1
culture of page directive
sets the culture
ch 1
debug of page directive
indicates if compilation should include debug symbols
ch 1
description of page directive
represents description of the page. PAGE COMPILERS IGNORE THIS!
Ch 1
EnableSessionState property of page directive
whether Session state is enabled True, Read Only, False. Default is TRUE
Ch 1
EnableViewState of page directive
indicates whether view state is maintained for page and containers. Default is TRUE
Ch 1
EnableViewStateMAC of page directive
indicates whether encrypted view state should be verified against MAC to assure that is is not tampered with
Ch 1
errorpage of page directive
Specifies error page where user is directed
Ch 1
Explicit of Page directive
whether all variables must be explicitly declared. default FALSE!
Ch 1
Inherits of page directive
represents name of code-behind class that contains code for the aspx page
Ch 1
Language of page directive?
any .net programming language
Ch 1
LCID of page directive?
Defines 32 bit locale identifier for code in the page
Ch 1
ResponseEncoding
Defines response encoding for the page such as UTF7Encoding, UTF8Encoding, ASCIIEncoding, UnicodeEncoding and so on
Ch 1
SRC of page directive
source filename of the code behind class that is dynamically compiled when the web page is requested. VS.Net does not use this since it precompiles the code behind class
Ch 1
SmartNavigation of page directive
whether smart navigation is enabled. preserves scroll position and element focus when page is refreshed. Only supported in IE 5. Default it FALSE
Ch 1
Strict of page directive
whether page should be compiled using Option Strict. Default is FALSe
Ch 1
Trace of page directive
indicates whether page level caching is enabled
Ch 1
TraceMode of page directive
indicates how trace messages are to be displayed when tracing is enabled. Default is SORTBYTIME and other possible is SORTBYCATEGORY
Ch 1
Transaction of page directive...4 options
indicates whether transactions are support on page. Derfault is DISABLED and other possible is NOT SUPPORTED, SUPPORTED, REQUIRED, and REQUIREDNEW
Ch 1
UICulture of page directive
culture setting for gui
Ch 1
WarningLevel of page directive
warning level at which compilation should be stopped....values 0 through 4
Ch 1
event arguments, what? and type?
-specifies data associated with an event
eventargs type
Ch 1
event handlers
1) a method that performs custom actions in response to event notifcation.
2) return void
3) 2 arguments - 1 specifying object where event occured, second argument is object of type eventargs or a derived class
ch 1
2 arguments of event handlers?
1) object that triggered event (the publisher)
2) second argument is of type eventargs or a derived class therein.
Ch 1
delegate
special class with an object capable of storing methods with a particular prototype
ch 1
what is this a definition of:

Public Delegate Sub EventHandler(By Val Sender As Object, ByVal e As EventArgs)
Delegate
Ch 1
event? based on what?
publisher subscriber model
ch 1
how does a subscriber class subscribe to a publisher?
by registering an appropriate event handler
ch 1
define the pre-render event?
Public Event PreRender As EventHandler
ch 1
how do you register an event handler?
encapsulate the event handler in a delegate object and add the delegate to the event
AddHandler Me.PreRender, AddressOf Me.Page_PreRender
ch 1
AddHandler
ensures that the event handler will be added to the LINKED LIST, but not remove existing event handlers that are registered with the event
ch 1
removeHandler?
removes event handler from the registered event handlers
ch 1
protected virtual methods and classes?
each class creates this protected method that notifies the other event handlers when the event occurs
ch 1
calling a derived class and exam tip about base class?
your derived class should call the base class from an overridden method to achieve full functionality of the base class
ch 1
4 overview steps to publishing and subscribing to an event?
1) Publishing event
2) Subscribing to event
3) Event handling
4) Handle event by overriding the virtual, protected method of the baseclass
Ch 1
4 steps to publishing event?
1) define delegate type that specifies the prototype of the event handler.
2) Define event based on delegate type
3) define a protect virtual method that raises the event
4) when it occurs, invoke the protected virtual method defined in the preceding step
Ch 1
3 steps to subscribing to event?
1) implement event handler with signature specified by delgate object of event
2) create a delegate object for the event
3) attach the event handler to the event
Ch 1
Event handling (3 steps)
1) handle eents by overriding the virtual protected method of the base class
2) handle events by attaching a delegate to the event
3) handle events of the Page class through AutoEventWireup
ch 1
invocation of 3 steps in ASP.NET page
1) onInit
2) onLoad
3) onPreRender
Ch 1
what if you do not want to inherit from the base class?
you must attach a delegate object to the event instead
Ch 1
advantages of attachiung a delegate object to event instead of inheriting from base class? 4 steps
1) more flexible
2) delegates allow attaching single event handler to multiple events
3) delegates allow to dynamically add and remove event handlers for event
4) subscriber class not required
ch 1
attaching an event handler to the Load event?
only through its delegate object
ch 1
what happens when a method name is used with the AddressOf operator?
It works as a reference to the actual method definition
ch 1
adding event handlers of the load event?
must be done by adding new instances of the delegate to it.
ch 1
what is this?
Public Delegate Sub EventHandler(sender As Object, e As EventArgs)
definition of event handler
other mechanism for handling events raised by the Page Class?
AutoEventWireup
ch 1
what does AutoEventWireup require?
using specific names for the event handlers of Page class events. Has to be of type Page_eventName
ie Page_Init, Page_Load, Page_PreRender
ch 1
link UI and business logic when they're in separate files?
using SRC and Inherits directives
ch 1
what are namespaces good for?
to organize classes and other programming elements...this is done by enclosing all of the code in a namespace
ch 1
3 benefits of precompiling?
1) catch any compilation errors before deploying the web page
2) do not have to distribute source code of code behind file
3) if development and deployment use diff versions of .Net Framework, pre-compilation ensures that it is compiled using the proper version of the Framework libraries
ch 1
how to precompile?
1) open VS command prompt
2) make sure bin sub-directory exists
3) vbc /t:library /r:[framework system dll] /r:[framework system web dll]/out:[bin] file.vb
ch 1
3 benefits of web forms?
1) support code behind for separation of business logic fro UI
2) provide event based programming model
3) support for RAD tools such as VS.Net
Ch 1
2 distinct pieces of a VS.Net web form?
ui in aspx
business logic in .vb
Ch 1
what if you can't see .vb file corressponding to an aspx?
VS.Net hides it in default view - click SHOW ALL FILES in tool bar
Ch 1
code behind and src
src file is compiled at runtime, codebehind attribute only used during VS.Net development; not recognized by ASP.Net
Ch 1
handling events by attaching the delegates?
set AutoEventWireup to FALSE!
Ch 1
code between #region and #end region?
only used at design time in visual designers, not present in compiled code
ch 1
library vs namespace?
library is a physical unit that stores namespaces. namespaces are the class
ch 1
significants of imports directive?
just include the namespace with imports, and compiler knows to look for classes in those namespace. this SAVES typing
ch 1
ildasm.exe
MSIL disassembler. Use it to display type info about programs that you write.
ch 1
reflection?
technique that allows you to dynamically get information about types.
ch 1
implements directive?
indicates that the aspx page or the ascx file implements the interface specified by the Interface attribute of the directive
ch 1
outputcache directive
controls the output caching of an aspx or ascx
ch 1
Page directive
specifies page related attributes that are used by the asp.net compiuler when the web client requests the aspx page
Ch 1
reference directive
indicates a web page or user control that should be compiled and linked during compilation of the aspx page
Review 1
How is an ASP.Net app executed?
Through a series of request and response messages between client and browser.
Review 1
7 advantages of .Net
1) enhanced application development model
2) rich class library support
3) performance
4) scalability
5) security
6) manageability
7) extensibility
Review 1
each aspx file? derives from?
1) converted to a class that derives from System.Web.UI.Page.Class
2) Compiled to a dll when the page is opened in browser for first time
Review 1
Where to define class level code?
NOT in between the render blocks!!
Review 1
Directives, 4 options
Allow you to specify various compiler options
1) Caching
2) Set references
3) Import namespaces
4) Register controls
Review 1
Page Directive?
Used to specicfy page related attributes that helps ASP.Net know how to compile and execute thep page.
Review 1
Code-behind? 3 things
1) separate user interface from business logic
2) UI is in aspx file
3) business logic code is in .vb file
Review 1
SRC attribute?
Inherits attribute?
1) specifies name of code-behind file
2) specify name of class that contains the code for the aspx page
Review 1
What if you are precompiling the code behind file?
Then you need not specify the SRC attribute
Review 1
preferred way of creating web forms and VS.Net?
code behind with precomilation
Review 1
How to access HTML controls in VS.Net? 2 things
1) Use the HTML tab of VS.Net
2) Not programatically accessible on the web server
Review 1
Server Controls? (2 things and also 2 categories)
1) Directly accessible on Web server
2) HTML server controls and Web server controls
Review 1
HTML server controls?
1) exist to provide easy migration path for existing web forms
2) runat=server makes it easy to convert!
Review 1
What does asp.net do with HTML server controls? 2 things and 2 events that it can raise?
1) analyzes HTTP post to find any events need to be raised at server side and raises all such events
2) ServerClick or ServerChange event
Review 1
Client side event handling (good for what?)
MouseMove or KeyPress
same techniques still work in handling events for HTML server controls
Review 1
Web server controls?
1) Rich and consisten programming model that integrates with .Net framework
Review 1
Autopostback? 3 controls that have it...and what happens
1) DropDownList
2) RadioButton
3) Checkbox
When set to TRUE causes immediate postback of page when changed.
Review 1
preferred way to add client side event handling code for web server controls?
Use the ATTRIBUTE property
Review 1
3 types of buttons?
1) Button
2) LinkButton
3) ImageButton
Review 1
4 list web server controls?
1) ListBox
2) DropDownlist
3) CheckboxList
4) RadioButtonList
Review 1
2 container controls? 2 things
1) Placeholder and Panel.
2) Organize other controls at design time or on the fly!
Review 1
AdRotator control?
1) Display randomly selected ad banner on web page.
2) uses settings in an XML advertisement file
Review 1
Calendar control?
Display a single month on a web page. Select dates and move to previous month
Review 1
When to set properties? 2 times
1) design time
2) run time
Review 1
Setting control property at design time?
Specify desired property value in control's property window
Review 1
Setting control properties at runtime?
assigns value using control.property = value syntax
Review 1
How to load control dynamically?
1) Reserve space with placeholder or panel control.
2) Create controls in code by declaring and instantiating variables of the proper class
3) add new controls to the Controls collection of Panel or Placeholder