Home > Flashcards > Print Preview
The flashcards below were created by user
on FreezingBlue Flashcards
. What would you like to do?
How do you make an image a hyperlink?
Put it inside anchor tags: <a href="foo"><img src="link-to-png" /></a>
What does the alt attribute do (e.g., as part of an img element)?
Adds information for visually impaired users of the website.
What attribute can be added to the anchor element (<a>) to have a link open in new tab or window?
What is the current HTML standard?
Why should the document type declaration be included in all HTML documents?
To specify the HTML standard being used in the document.
What tag contains metadata about the webpage?
What tag instructs the browser to expect a well-formed HTML document?
How would the following html tag definition be different in HTML5?
<html xmlns=http://www.w3.org/1999/xhtml lang="en
- In html5, the namespace no longer needs to be specifiied, so the new definition would be:
- <html lang="en">
What is a new, acceptable way to define the <meta> tag?
Where is the best place to put it?
- <meta charset="UTF-8">
- Is should be the first child of the <head> tag
For HTML5, what are some of the tags being dropped in favor of CSS?
- <basefont>, <big>, <center>, <font>, <strike>, <tt>, <u>
- (See: http://www.w3.org/TR/html5-diff/)
Define a <video> tag in HTML5
- <video src="big_buck_bunny.mp4" controls>Sorry, your browser does not support the video tag.</video>
- The <audio> tag can be defined similarly.
Define a <canvas> tag in HTML5.
- <canvas id="myArtwork" width="200" height="200">
- Canvas tag not supported by your browser</canvas>
What is one of the disadvantages of cookies?
What is new in HTML5 that might be used to replace cookies?
- With cookies, the data is passed back and forth with every HTTP request or response.
- In HTML5, with Web Storage, developers can use local or session storage.
What are CDNs? What are its benefits?
- Mobile users could benefit by realizing faster web page response times because some files are already downloaded and cached.
What are some differences between ASP.NET and ASP.NET MVC?
URL mapping in ASP.NET is usually to a file, whereas in ASP.NET MVC, URLs map to methods on classes (i.e., Controllers).
What is one of the basic tenets of asp.net mvc?
What are the benefits?
- Presentation logic is decoupled from underlying application logic.
- If an application needs to present different views to both a desktop and mobile device, it can use the same data model while using separate views.
How is URL routing different between ASP.NET and ASP.NET MVC?
How could this be a benefit?
- URL mapping in ASP.NET is usually to a file, whereas in ASP.NET MVC, URLs map to methods on classes (i.e., Controllers).
- Allows the programmer greater customization through adjustments in controller methods and parameter arguments.
- Gives the flexibility to optimize a site for search engine optimization (SEO).
What is a page directive and what does it do?
- Gives APS.NET basic information about how to compile the page.
- Indicates language used, where code file is located.
What is the Doctype of an html page for and what are two common doctypes used today?
- Indicates the type of markup that you're using to create your web page.
- It influences how a browser interprets your web page.
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
[ASP.NET pg 130]
What are the differences between HTML server controls and Web controls?
- HTML server controls are server-based equivalents for standard HTML elements. Useful when migrating ordinary HTML pages to ASP.NET.
- Web controls are similar to HTML controls, but include a richer object model, provide more events and more closely resemble controls used for Windows development. Also includes GridView, Calendar, and validation controls not provided by HTML controls.
[ASP.NET page 133]
Which tags should have the runat="server" attribute?
What other attribute do such tags need to make them server controls?
- Tags that you need to interact with in the code.
- They also need an id attribute.
[ASP.NET page 162]
In the global.asax file, what does putting code into a function called Application_EndRequest() do?
Executes with each request just after the page code is executed.
[ASP.NET page 163]
What is the structure of a web.config file?
- <?xml version="1.0" ?>
[ASP.NET page 166]
Given the following xml in the web.config file right below <configuration>, how would you access the value part?
[ASP.NET page 177]
Define a minimal read-only textarea web control
<asp:TextBox id="txt" TextMode="MultiLine" Rows="5" runat="server" ReadOnly="True" />
[ASP.NET page 180]
What are different ways to create color objects?
- Using ARGB values (i.e., 0-255) with the alpha component representing the transparency of a color (255 being opaque).
- Use a predefined .NET color name, which include the 140 HTML color names.
- Using an HTML color name using the ColorTranslator class.
[ASP.NET page 181]
Set the font for a control object ctrl to 14pt Verdana Bold, with a fallback to Tahoma then Ariel.
Which fonts are supported on all browsers?
- ctrl.Font.Name = "Verdana";
- ctrl.Font.Size = FontUnit.Point(14);
- ctrl.Font.Bold = true;
- <asp:TextBox Font-Names="Verdana,Tahoma,Arial" />
- All browsers support
- Arial and Helvetica
[ASP.NET page 183]
How do you designate the control to activate when the Enter key is hit?
What is the restriction on the control?
- <form DefaultButton="cmdSubmit" runat="server">
- It must be a control that implements the IButtonControl interface (i.e., Button, LinkButton, or ImageButton)
[ASP.NET page 184]
What three-letter prefixes might make a good way to identify control types?
- Button: cmd
- CheckBox: chk
- Image: img
- Label: lbl
- List control: lst
- Panel: pnl
- RadioButton: opt
- TextBox: txt
[ASP.NET page 187]
What is the server-side equivalent of <ul> and <ol>?
What is the difference in DisplayModes between LinkButton and HyperLink?
- LinkButton causes a Click event that can be reacted to on the server.
- With HyperLink, the text is treated as a relative or absolute URL.
State management is the way in which information is retained between requests.
What information is typically stored this way?
What are things to keep in mind when determining a state management system.
- The information stored could be:
- Shopping cart items
- user name or permissions
- usage statistics
- Things to keep in mind are:
[ASP.NET page 194]
What is the order of events in page processing?
[ASP.NET page 253]
What is the ViewState? What is it used for?
- View State is a way to store information that gets posted back to the server.
- It's normally used to keep text and other form data in place with each post back and response.
- One example is a hit counter.
[ASP.NET page 265]
What are some of the limitations of using a query string?
- Information is limited to simple strings containing URL-legal characters
- Information is visible to both user and eavesdroppers
- Your program must protect against user tampering
- The browser could impose a URL-length limit (e.g., 1KB to 2KB)
What characters are allowed in a URL? Is it the same for all browsers?
- Alphanumeric or $-_.+!*
- Internet Exploder allows other characters in addition.
[ASP.NET page 270]
How are cookies retrieved and set?
Cookies are retrieved from the Request object and set using the Response object.
[ASP.NET page 272]
What is session tracking? What does using it buy you?
How are session IDs stored and/or transmitted?
- It's a way to track sessions using a unique 120-bit identifier. It buys you security because it's a randomly-generated value and is the only piece of session-related information transmitted between server and client.
- By default, the session ID can be sent in a special cookie (ASP.NET_SessoinId).
[ASP.NET page 278]
Which HttpCookieMode value should you use to have ASP.NET determine if cookies are enabled and functional by attempting to set and retrieve a cookie (a technique commonly used on the Web)?
Where would this get set?
- This is set in the web.config file as follows:
[ASP.NET page 282]
What is InProc mode?
What are its traits?
- This is the default mode that instructs information to be stored in the same process as the ASP.NET worker threads.
- The traits are best performance but less durability. InProc cannot be used on a web farm which uses multiple web servers to run the website.
[ASP.NET page 294]
What are the five validator controls provided by ASP.NET?
[ASP.NET page 348]
How would you access the parameter in the code behind, given the following parameterized URL segment:
[ASP.NET page 370]
How do you apply html styling in Visual Studio?
How do you bring up CSS Properties tab?
- In design mode:
- Click select the element to apply styling to (e.g., div)
- Choose Format -> New Style
- Click View -> CSS Properties
[ASP.NET page 380]
Where do you link to a stylesheet in an html page?
Give an example of the tag.
- It goes inside the <head> tag.
- <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
[ASP.NET page 647]
What is the first step in securing your application?
Deciding where you need security and what it needs to protect.
[ASP.NET page 648]
What is a SQL Injection attack and how is it prevented?
- It's when user input having embedded sql is not strongly typed and unexpectedly executed
- Use paramterized statements instead of embedding user input in the statement
What would you like to do?
Home > Flashcards > Print Preview