No because events are not wired to the code-behind, so they still fire.
Back
AE5: Authorization has been verified to use the cache
Front
ResolveRequestCache application event
Back
SaveStateComplete
Front
The view and control states have been saved at this stage. Placing code here will affect this page, but these changes will not be used for the next postback.
Triggered when the web app is first launched. Only fired once in the lifetime of the app. An ideal place to initialize variables that will be used throughout the site.
Back
When does the Init page load event start?
Front
After each control has been initialized
Back
PreRenderComplete
Front
This is a special event for binding data to controls.
Back
Application_Error
Front
Triggers when an error occurs on the site.
Back
AE1: A request has been received
Front
BeginRequest application event
Back
AE2: Identity of the user has been established.
Front
AuthenticateRequest application event
Back
Session_OnStart
Front
Triggers when a new user starts a session for the first time
Back
AE3: Ensures authentication has occurred
Front
DefaultAuthentication application event
Back
What are the stages of the Page life cycle in order?
Front
1. Compile page
2. Set request and response
3. Initialize page controls
4. If postback, load control properties from view state
5. Validates pages and controls
6. Call control event handlers
7. Save view state
8. Unload request and response
Back
PreInit
Front
This is where a test can be made to see if this is a postback page. Also where controls are created or re-created, sets the master page, sets the theme, reads or sets property values.
Back
PreLoad
Front
Not a commonly used event.
Back
What are the two session events?
Front
OnStart and OnEnd
Back
Init
Front
Buttons, labels, or the form itself, called controls, can have their properties read or initialized.
Back
Unload
Front
This event fires for each control found on the page. Then, the unload event will fire for the page itself. This is commonly sued for cleanup methods such as closing files and database connections. This is also where new pages can be called to pop up.
Back
When do Button.Click events run?
Front
Right after Load but before LoadComplete
Back
Application_LogRequest
Front
Triggered only when a request has been made to the application; used for custom logging.
Back
AE8: Event handling is finished.
Front
PostRequestHandlerExecute application event
Back
What phase should you initialize your page controls?
Front
During the Load event because ASP.net already knows whether the request is a PostBack or not.
The Method Name dropdown box in VB is not affected by the value of what?
Front
The AutoEventWireup value
Back
Application_End
Front
Triggered just before the app is terminated. Typically people will free up application resources or save logging info.
Back
Response.Write
Front
Used to print text or the value of a variable onto the webpage.
Back
Which event is useful for making final changes to pages and why?
Front
The PreRender event because all the controls will have been initialized and all PostBack events have taken place. Also occurs before saving the ViewState.
Back
What is Global.asax?
Front
A file on the server that, if present, contains program code for handling session and application events. These events are only processed from the file and nothing from this file is ever passed to the client's browser.
Back
Where do the events in the application and session stages of the app occur?
Front
These only occur on the web server.
Back
PreRender
Front
This is the last stage before ASP.NET starts converting everything into a web page. Make any final changes here.
Back
What is a Page Event?
Front
An alert specifying that something has changed on the page.
Back
AE10: Cache is ready for subsequent requests
Front
UpdateRequestCache application event
Back
AE4: User authentication has been verified.
Front
AuthorizeRequest application event
Back
What must you do to use cross-page posting?
Front
Change the value of the PostBackUrl property of a control.
Back
Postback
Front
Allows the developer to separate code that needs to be run only when the page is first loaded.
Back
AE9: Requests for state have been saved
Front
ReleaseRequestState application event
Back
Section 2
(50 cards)
What does "Me" mean in reference to Visual Basic handles?
Front
It is an alias for the current form. For example Handles Me.Load references events occurring in the current form.
Back
What does the remoteOnly attribute in <customErrors> do?
Front
It allows you to control whether or not you see custom errors or generic errors when debugging a page.
Back
What does Tracing show you about your page?
Front
HTTP Headers
Execution Times
Client IP address
Query String parameters
Cookies
Back
What keyboard combination runs the site step by step in debug mode?
Front
F5
Back
How do you specify the version of the .net framework you are using?
Front
By using application pools.
Back
With AutoEventWireup set to false...
Front
...the page events are not fired because the events are no longer wired to the code-behind.
Back
How would you see a number of variables, headers, etc with your page?
Front
Enable/use Tracing.
Back
What do you call the topmost part of an ASP.NET web page and what does it do?
Front
It is called the Page directive and is used to specify the coding language, the name of the code-behind file, setting AutoEventWireup to true/false and more.
Back
What is the most commonly used Page Life Cycle event?
Front
Load
Back
What do you need to add to a content page if you used a ScriptManager on a master page?
Front
A ScriptManagerProxy
Back
What does AJAX stand for?
Front
Asynchronous JavaScript and XML - A set of web development codes and techniques used to create client-side Web interfaces and applications.
Back
What are some benefits of application pools?
Front
Can isolate sites away from each other.
Back
Which type of control always has a runat attribute and an id?
Front
Server controls
Back
What does the ScriptManager control do?
Front
Communicates with the server to ensure necessary elements are present.
Back
When do the items of code in the Page_Load event happen?
Front
Every time the page is loaded in a browser.
Back
How often are cookies submitted?
Front
At every subsequent request from browser to the server.
Back
What are several different deployment methods?
Front
Web packages
Xcopy
Publishing
Windows Installer packages
Back
What is a message produced by a browser that something has occurred called?
Front
An event.
Back
Which type of deployment method can make changes to the server?
Front
Windows Installer packages
Back
Name different types of controls:
Front
HTML Controls
Server controls
User controls
Custom controls
Back
Which type of control cannot be accessed by ASP.NET?
Front
HTML controls
Back
What is the main template page for all pages in a web site called?
Front
The Master page. Normally contains the menu, copyright information and any content duplicated across all pages in a site.
Back
What are query strings good for?
Front
Can be passed from one page to another.
Back
If you have to dispose of an object where would you do it?
Front
In the finally area, which always runs with or without an exception.
Back
Where would you want to place your javascript?
Front
Javascript is executed top to bottom, therefore you would not want to place a large script at the top because it will inhibit page loading. Small scripts can go up top but larger ones should be lower.
Back
How do you catch exception errors within a method?
A collection of JavaScript scripts which may be used to speed up the process of writing code.
Back
What is impersonation used for?
Front
Allows an entity to assume the identity and privileges of another entity without restrictions and without any indication visible to the recipients that delegation has taken place.
Back
What are the 3 main types of client side storage?
Front
Cookies
Query Strings
ControlState
Back
How would you create an exception on purpose?
Front
Throw it.
Back
What is the name of the file which contains all .NET settings on a computer?
Front
machine.config - Do not change this unless you know what you're doing.
Back
Which site deployment methods utilizes a zip file that you unzip on the server?
Front
Webpackages
Back
What is the difference between Response.Redirect and Server.Transfer?
Front
Server.Transfer will serve a second page to the browser without changing the URL, whereas Response.Redirect will actually forward to the new URL and change it in the browser.
Back
What is view-state?
Front
A page-level management tool which is used to maintain the state of Web Form controls.
Back
What is the most popular client scripting environment?
Front
Javascript
Back
What word do you add inside a style sheet so that nothing can override it?
Front
!important
Back
What is Authentication?
Front
How you verify the identity of a user, computer or person.
Back
What does controlstate do?
Front
Stores hidden data in a web form.
Back
Section 3
(50 cards)
cs or vb file ext
Front
Used for the code behind files. For example Website.aspx would be the main design page but Website.aspx.cs would be the C# code-behind page for it.
Back
How do you set a breakpoint?
Front
By clicking the gray area to the far left of the event procedure header.
Back
Where is the Class Name drop down menu located?
Front
In the code-behind view of a .cs or .vb file, on top of the source code on the left hand side.
Back
What is in the Bin directory?
Front
Contains compiled code (.dll files) for controls, components or other code that you want to reference in your application. Any classes represented by code int he Bin folder automatically get reference in your application.
Back
What is in the App_Code directory?
Front
The raw code files themselves.
Back
What happens to the list of events in the Method Name drop down list of a visual basic ASP.NET file if you change the AutoEventWireup attribute to False?
Front
Nothing, visual basic is not reliant on autoeventwireup, therefore the method name list always contains the events related to the page whether AEWU is true or false.
Back
Which event fires the controls found on the page?
Front
The Unload stage. For example if you click a button it will fire that event, then fire the whole page, then unload the page normally as a Postback, where the whole process starts again.
Back
What is in the App_Data directory?
Front
The default directory for any databases used by the asp.net website.
Back
What stage do buttons, labels or other controls have their properties read?
Front
The Init stage.
Back
What is the name of the code at the top of an ASP.NET page which includes <% %> ?
Front
The page Directive
Back
axd file ext
Front
These are used for trace files when they are enabled in the web.config file
Back
skin file ext
Front
Used for skinning files
Back
master file ext
Front
Used for master page files. Default name is Master1.master
Back
Why is it important to understand the page life cycle?
Front
So you can put your code in the appropriate section for the effect you intend.
Back
How many times can you use an event procedure from the Method name drop down?
Front
Each event procedure can only be run once per page. If you try to add a duplicate event procedure to your page it will simply move your cursor to the one you already have.
Back
Where is the Method Name drop down menu located?
Front
In the code-behind view of a .cs or .vb file, on top of the source code on the right hand side.
Back
What kind of encryption is used by viewstate?
Front
base64 serialization, which is easy to decode
Back
sitemap file ext
Front
Used for sitemap files, the default is web.sitemap
Back
Do event handlers work with C# ?
Front
No, it is used for visual basic.
Back
What is ViewState mostly used for?
Front
To preserve form information across Postbacks.
Back
What is in the App_WebReferences directory?
Front
Holds discovery files and WSDL files for reference to web services to be consumed in the site.
Back
What does a C# file need in order to see events?
Front
It needs AutoEventWireup to be set to true.
Back
What can you do in the Page_Load stage?
Front
You can set control properties here, also connections to a database typically happen here.
Back
ascx file ext
Front
User control files
Back
At what point of an event procedure does the breakpoint pause at?
Front
Right before the code of that procedure runs.
Back
Encapsulations of sections of pages which are registered and used as controls in ASP.NET are?
Front
User controls
Back
Where would you initialize shared user-defined variables of an application?
Front
In the Application_OnStart event in the global.asax file.
Back
What is in the App_GlobalResources directory?
Front
Holds resx files with localized resources available to every page of the site. This is where asp.net developers will typically store localized messages which are used on more than one page.
Back
What is in the App_Themes directory?
Front
Holds files related to themes which is a new asp.net feature that helps ensure a consistent appearance throughout a web site and makes it easier to change the web site's appearance when necessary.
Back
dbml file ext
Front
LINQ to SQL data classes file
Back
What stage can you place code which will not be used for the next postback?
Front
In the SaveStateComplete stage.
Back
What is the hidden field called that is used to send information to the browser from a web form?
Front
_VIEWSTATE
Back
asax file ext
Front
The global application file, commonly called Global.asax, used for application-level logic and for defining global variables that work across the entire application.
Back
What does Shift+F5 do in visual studio?
Front
It continues running the page and exits debugging mode if you were in the process of using F5 to debug.
Back
What stage would you make changes to the view state in?
Front
The InitComplete stage, since the controls have been read or initialized at this point.
Back
What does a visual basic file need in order to see events?
Front
An event handler.
Back
What is in the App_LocalResources directory?
Front
Can be used to hold localization files so the asp.net site can change languages automagically.
Back
What happens in the Method Name drop down list if you remove the event handler from an event procedure in a VB asp.net file?
Front
The events disappear because the event handler is no longer present.
Back
In what stage are the view and control states saved by?
Front
The SaveStateComplete stage.
Back
What page life cycle would you make any final changes to your page?
Front
The PreRender stage. This is the last stage before things get converted into HTML by IIS.
Back
How do you add code to the code-behind in a visual basic file?
Front
You can either double click a control or choose an item from the method name drop down list and it will place most of the code on the page for you.
Back
edmx file ext
Front
ADO.NET Entity Framework model
Back
What keyboard combination runs the site normally as an end user would see it?
Front
Control+F5
Back
What happens in the LoadComplete stage?
Front
Some controls need to be placed on the form before changes to their properties will take effect, you'd do that here.
Back
svc file ext
Front
Used for Windows Communication Foundation service files (WCF)
Back
What happens during the PreInit stage?
Front
You can test to see if this is a postback or not.
Back
Custom controls do not have an ASCX markup file, what do they use instead?
Front
DLL's
Back
config file ext
Front
Most often web.config, these are the configuration files, which can be nested, that define specific parameters. These are xml files.
Back
What are master pages?
Front
Basically template pages, which can be nested, used to decrease the amount of repeat code needing to be used.
Back
What does the Method Name drop down menu contain?
Front
All the events related to the web page.
Back
Section 4
(50 cards)
What must you remember to add to an img tag?
Front
The Alt="" text - Example: <img src="image1.gif" alt="This is Alt text" />
Back
What does the <sub> tag do?
Front
Its used to change the appearance of the enclosed text or numeric as subscript, making it look like footnotes.
Back
How do you specify a trademark symbol in HTML?
Front
By using ®
Back
What does ASP stand for?
Front
Application Service Provider
Back
What is cross-page posting?
Front
Moving data from one page to another.
Back
How would you reuse a user control for a different site?
Front
You must copy the control to the new website because they only work on a site by site basis and cannot be added to the toolbar.
Back
Why is it important to use the IsPostback property on a page?
Front
So you can sense whether or not the page has already been initialized and therefore not waste resources doing it again. Prevents the page from processing the same code on every postback.
Back
If you create an applicationSetting called greeting how would you then call it in your code?
Front
By calling the Properties.Settings.Default.greeting value. It is strongly typed when using applicationSettings. It is not if using the older appSettings.
Back
What's the difference between page life cycle events and application life cycle events?
Front
Page events happen each time you go to a new page or reload/postback the one you're on. Application events occur when the App starts and stops regardless of who is going to what pages.
Back
How do you get to where you can add users to a site?
Front
In visual studio, click the Website menu, then ASP.NET configuration.
Back
Why would you use the configSource option?
Front
To allow admins to set a specific value without giving them access to the rest.
Back
When creating css classes what must you remember?
Front
To enclose the elements in curly braces and use a ; at the end {like this;}
Back
Why wouldn't it work to try to manipulate controls with code in the Initialization page life cycle stage?
Front
Because the data has not yet been loaded and control values have not yet been restored from view state. That happens next in the Load cycle.
Back
Why is postback needed for web sites but not for desktop applications?
Front
Because desktop applications only initialize once whereas web pages will initialize each server round-trip.
Back
What kind of objects are user controls?
Front
System.Web.UI.UserControl objects. They are saved separately as .ascx files.
Back
How would you define a session variable called X that has Hello world in it?
Front
Session["X"] = "Hello world";
Back
How do you comment HTML code?
Front
By using an exclamation point and dashes <!-- Like this -->
Back
How do you make a global.asax file?
Front
You must click Add New Item, then select Global Application Class.
Back
Give a summary of Cross-page posting:
Front
1. A simpler form of Server.Transfer
2. Uses the PostBackURL method of a web control to change pages.
3. URL changes (complete page cycle)
4. It's limited to pages on the current site
5. ViewState supported but does not include ViewState variables.
Back
How do you comment ASP.NET code?
Front
By using double slashes // like this
Back
What would you store as an application setting?
Front
Anything someone may need to edit down the road such as database connection strings and other variables.
Back
What is camelcase?
Front
The method used by most traditional programming languages when typing multi word variable names, parameters etc where the first word is lower case and subsequent words have the first letter capitalized. For example thisWouldBeCamelCase.
Back
What happens during the Unload stage of the page life cycle?
Front
This event occurs after the page has been rendered and sent to the client/browser. Page properties are unloaded and cleanup is performed to free up memory.
Back
What is the app.config file for?
Front
It contains the .net configuration data which is a chain of settings specific to a Windows application. It is normally in the root directory of the application that is being configured.
Back
What namespace do you have to add to your page in order to call an appSetting?
Front
using System.Web.Configurations
Back
What are 3 modes of persistence for session variables?
1. It's the standard method of switching to another page.
2. It can be directed to any URL
3. ViewState is not applicable
Back
How would you compare the input of a textbox to the value of "myPassword" which is saved in the appSettings of the asp.net configuration?
Front
An if statement such as: if (TextBox1.Text == System.Configuration.ConfigurationSettings.AppSettings["myPassword"]) Label1.text = "You're in"; else Label1.text = "Incorrect Password";
Back
What is required to use cross-page posting?
Front
The PostBackURL property must be set on the control. For example on a Button control you would set the PostBackURL to another page, then when you click the button it sends you to that page.
Back
What is the difference between a class selector and an ID selector?
Front
A class selector, such as t.center, is used to specify a style for a group of elements, in this case anywhere you'd use a T tab. The ID selector allows you to style a unique element. You specify the name of it and then call it in your code using the same ID. For example #id1 {color:green;} in the CSS and then <p id=id1> in the HTML.
Back
What 4 things are required in order to configure an endpoint when using a WCF service?
Front
Address: specifies the location of the endpoint
Binding: specifies how the client communicates with endpoint
Contract: identifies the availability of operations
Behavior: specifies local implementation details of endpoint
Back
What is the first part of any style sheet?
Front
The selector
Back
Where would you set the configsource property?
Front
In the web.config as an option for a parameter. For example in the system.web section you could add <trace configSource="trace.config" /> to both add the trace element and point it to the trace.config file. This would enable system administrators to turn tracing on or off by editing that trace.config file, and you could still block access to the root web.config so they couldn't change anything else.
Back
What are the two methods of authentication seen in the web.config file?
Front
Windows mode or Forms mode.
Back
What's the difference between AppSettings and ApplicationSettings?
Front
AppSettings is from .net 2.0 vs ApplicationSettings which is .net 3.5 and 4
Back
If you create an application setting where will it be stored?
Front
In the web.config file under the applicationSettings tab. The setting will have a name and serializeAs attribute as well as a nested <value>value tag</value>
Back
What kind of objects are server controls?
Front
System.Web.UI.WebControls objects
Back
How would you invert the hue, saturation, etc of an image using HTML?
Front
In the img tag, use the STYLE="filter:Invert" inline style
Back
How do you add an appSetting?
Front
Through the ASP.NET configuration webpage.
Back
Give a summary of Server.Transfer:
Front
1. The browser is unaware that the web page changed.
2. URL doesn't change (incomplete page cycle)
3. It's limited to pages on the current site
4. ViewState is supported but does not include ViewState variables.
Back
What does the <sup> tag do?
Front
Its used to change the text to superscript such as 10 to the 3rd power.
Back
What is the name of the file which contains all default settings for the entire .net system on a computer?
Front
Machine.config
Back
How would you use a session variable called X in another page?
Front
Set the label or control by using:
Label1.Text = Convert.ToString(Session["X"]);
Back
If you create an appSetting called greeting how would you use it in your code?
Front
You would have to call WebConfigurationManager.AppSettings["greeting"]. It is NOT strongly typed, you must type it correctly.
Back
How do you add a user control to a page?
Front
Add a Panel control, then drag the .ascx file from the solution explorer to the Panel.
Back
What do session objects do?
Front
They hold information about one single user in the form of variables, and are available to all pages in one application.
Back
Name the 6 ASP.NET intrinsic objects:
Front
Request
Server
Application
Session
Response
HttpContext
Back
What is the difference between Response.Redirect and Server.Transfer?
Front
Response.Redirect forwards you to the new page and reflects the new URL whereas Server.Transfer sends the browser a different page but leaves the URL the same. As far as the browser is concerned it is displaying the same page as before.
Back
Which ASP intrinsic object would you use if you want to extract something from the user?
Front
The request object.
Back
Section 5
(25 cards)
What are the 5 basic steps in the life cycle of a WFC application?
Front
1. Defining the service contract
2. Implementing the contract
3. Configuring the service by determining endpoint details
4. Hosting the service in an application
5. Building a client application
What's the main reason for having a strong name for an assembly?
Front
It is used at runtime to locate the assembly.
Back
What is in a WCF service?
Front
Composed of three parts: A service class that implements the service to be provided, a host environment to host the service and one or more endpoints to which clients will connect.
Back
Describe LinqDataSource
Front
Allows the use of LINQ in ASP.net by using the markup text to fetch and modify the data from an object. It uses LINQ to SQL to auto generate the data commands. A user can fetch or alter the data without having to write the SQL commands.
Back
What's the main purpose of ViewState?
Front
To preserve form data across postbacks. That way if someone submits something that had a wrong value, the rest of the fields aren't lost. They are simply repopulated after the postback with their previous information.
Back
Which intrinsic object would you use to read a cookie?
Front
The response object.
Back
What do application objects do?
Front
They contain properties and methods related to the currently running application regardless of how many users or what page they're on.
Back
What command can be used to simulate an exception error?
Front
The Throw command
Back
Provide info about custom controls:
Front
Designed for multiple applications
Added to the application's BIN directory or in the global assembly cache
Hard to create
Good for dynamic content
Can be added to the toolbox in visual studio
Back
Describe XmlDataSource
Front
XmlDataSource represents an XML data source to the data-bound controls such as gridview and treeview. Controls can use XmlDataSource to display heirarchical and tabular data. XmlDataSource extends the HierarchicalDataSourceControl class and also implements the IDatasource interface.
Back
What does a transaction object do?
Front
It allows you to process multiple SQL statements together as a group. If one fails, the transaction would roll back and reverse all parts of the group. Think of an online transaction.
Back
What command is used to retrieve rows from a data source in a DataReader?
Front
ExecuteReader
Back
What is a web service?
Front
A software system intended to support interoperable machine to machine interactions over a network.
Back
Describe SqlDataSource
Front
SqlDataSource is a db connection that uses an ADO.net provider such as SqlClient or ODBC. It enables a web server control to access data located in a relational db. It can be used with data bound controls such as gridview/formview etc to display and modify data on a web page.
Back
Which 2 methods does the Server intrinsic object use?
Front
Execute - runs another page and returns the calling page
Transfer - runs another page but does not return
Back
Name the 500 series HTTP error codes
Front
500: Internal server error
501: Not Implemented
502: Bad Gateway
503: Service Unavailable
504: Gateway Timeout
505: HTTP Version not supported
509: Bandwidth Limit Exceeded
Back
Which class provides objects that are constructed automatically for every request and destroyed when the request is completed?
Front
HttpContext
Back
How do you enable custom errors?
Front
In the web.config, under system.web, add the tag <customErrors mode ="On" /> You could then also set a redirect page if someone gets an error by using <customErrors mode="On" defaultRedirect="errorPage.aspx"/>
Back
What is a DTD?
Front
Stands for Document Type Definition, is written in a formal syntax and explains precisely which elements may appear where in a document and what the element's contents and attributes are. Basically the rules for an xml document.
Back
Which character is used to define a data binding?
Front
<%# %> Pound sign. Also, the Eval method is used for read-only and the bind method is used to be able to read/write.
Back
Name the two attributes required for a control to be considered data-aware?
Front
DataSource and DataSourceID
Back
What is WCF?
Front
Stands for Windows Communication Foundation. It is an application programming interface in the .net framework for building connected, service-oriented applications.
Back
Which folder contains reference contract files (.wsdl), schemas (.xsd) and discovery document files (.disco) ?
Front
The App_WebReferences folder
Back
Which two elements are required in the web.config?