The flashcards below were created by user iranye on FreezingBlue Flashcards.

  1. How do you make an image a hyperlink?
    Put it inside anchor tags: <a href="foo"><img src="link-to-png" /></a>
  2. What does the alt attribute do (e.g., as part of an img element)?
    Adds information for visually impaired users of the website.
  3. What attribute can be added to the anchor element (<a>) to have a link open in new tab or window?
  4. What is the current HTML standard?
  5. Why should the document type declaration be included in all HTML documents?
    To specify the HTML standard being used in the document.
  6. What tag contains metadata about the webpage?
  7. What tag instructs the browser to expect a well-formed HTML document?
    <!DOCTYPE html>
  8. [HTML]
    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">
  9. [HTML]
    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
  10. [HTML]
    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/)
  11. [HTML]
    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.
  12. [HTML]
    Define a <canvas> tag in HTML5.
    • <canvas id="myArtwork" width="200" height="200">
    • Canvas tag not supported by your browser</canvas>
  13. [HTML]
    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.
  14. [HTML]
    What are CDNs? What are its benefits?
    • CDNs are Content Delivery Networks, which make available common libraries like jQuery, CSS, and Javascript files.
    • Mobile users could benefit by realizing faster web page response times because some files are already downloaded and cached.
  15. [ASP.NET MVC]
    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).
  16. [ASP.NET MVC]
    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.
  17. [ASP.NET MVC]
    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).
  18. [ASP.NET 101]
    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.
  19. [ASP.NET 102]
    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">
  20. [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.
  21. [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.
  22. [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.
  23. [ASP.NET page 163]
    What is the structure of a web.config file?
    • <?xml version="1.0" ?>
    • <configuration>
    • <appSettings>...</appSettings>
    • <connectionStrings>...</connectionStrings>
    • <system.web>...</system.web>
    • </configuration>
  24. [ASP.NET page 166]
    Given the following xml in the web.config file right below <configuration>, how would you access the value part?
    <add key="DataFilePath"
    value="e:NetworkShareDocsShared" />
  25. [ASP.NET page 177]
    Define a minimal read-only textarea web control
    Image Upload 1
    <asp:TextBox id="txt" TextMode="MultiLine" Rows="5" runat="server" ReadOnly="True" />
  26. [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.
  27. [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
    • Times
    • Arial and Helvetica
    • Courier
  28. [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)
  29. [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
  30. [ASP.NET page 187]
    What is the server-side equivalent of <ul> and <ol>?
    What is the difference in DisplayModes between LinkButton and HyperLink?
    • BulletedList
    • 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.
  31. 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
    • preferences
    • usage statistics
    • Things to keep in mind are:
    • security
    • scalability
    • performance
  32. [ASP.NET page 194]
    What is the order of events in page processing?
    Image Upload 2
  33. [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.
  34. [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)
  35. [ASP.NET]
    What characters are allowed in a URL? Is it the same for all browsers?
    • Alphanumeric or $-_.+!*
    • Internet Exploder allows other characters in addition.
  36. [ASP.NET page 270]
    How are cookies retrieved and set?
    Cookies are retrieved from the Request object and set using the Response object.
  37. [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).
    • Another method that doesn't use cookies is to include the session ID as part of a modified URL.
  38. [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?
    • AutoDetect
    • This is set in the web.config file as follows:
    • <configuration>
    • <system.web>
    • ...
    • <sessionState
    • cookieless="AutoDetect"
    • ...
  39. [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.
  40. [ASP.NET page 294]
    What are the five validator controls provided by ASP.NET?
    • RequiredFieldValidator
    • RangeValidator
    • CompareValidator
    • RegularExpressionValidator
    • CustomValidator
  41. [ASP.NET page 348]
    How would you access the parameter in the code behind, given the following parameterized URL segment:
  42. [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
  43. [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" />
  44. [ASP.NET page 647]
    What is the first step in securing your application?
    Deciding where you need security and what it needs to protect.
  45. [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
Card Set
General to Specific Web Technology Questions. Some content from Apress Beginning ASP.NET 4.0
Show Answers