Web Resources

Answers to Self Review Exercises

21.1

a) True. b) False. Web.config is the file that stores configuration settings for an ASP.NET Web application. c) False. An unlimited number of validation controls can be placed on a Web Form. d) True. e) False. A LoginName control displays the current authenticated user name on a Web Form. A LoginStatus control displays a link to either log in or log out, depending on whether the user is currently authenticated. f) True. g) False. The frequency with which the AdRotator displays ads is specified in the AdvertisementFile. h) False. A Web control can map to a group of XHTML elementsASP.NET can generate complex XHTML markup from simple elements in an ASPX file. i) True.

21.2

a) bottom (information), middle (business logic), top (client). b) DropDownList. c) validator. d) postback. e) Page. f) Init, Load. g) code-behind. h) CreateUserWizard. i) master page, content pages. j) middle.

Exercises

21.3

(WebTime Modification) Modify the WebTime example to contain drop-down lists that allow the user to modify such Label properties as BackColor, ForeColor and FontSize. Configure these drop-down lists so that a postback occurs whenever the user makes a selection. When the page reloads, it should reflect the specified changes to the properties of the Label displaying the time.

21.4

(Page Hit Counter) Create an ASP.NET page that uses a persistent cookie (i.e., a cookie with a distant expiration date) to keep track of how many times the client computer has visited the page. Set the HttpCookie object's Expires property to DateTime.Now.AddMonths(1) to cause the cookie to remain on the client's computer for one month. Display the number of page hits (i.e., the cookie's value) every time the page loads.

21.5

(WebControls Modification) Provide the following functionality for the example in Section 21.5.1: When users click Register, store their information in the Users table of the Registration.mdf database (provided in the chapter's examples directory). On postback, thank the user for providing the information.

21.6

(Guestbook Application Modification) Add validation to the guestbook application in Section 21.7. Use validation controls to ensure that the user provides a name, a valid e-mail address and a message.

Web Services

Preface

Index

    Introduction to Computers, the Internet and Visual C#

    Introduction to the Visual C# 2005 Express Edition IDE

    Introduction to C# Applications

    Introduction to Classes and Objects

    Control Statements: Part 1

    Control Statements: Part 2

    Methods: A Deeper Look

    Arrays

    Classes and Objects: A Deeper Look

    Object-Oriented Programming: Inheritance

    Polymorphism, Interfaces & Operator Overloading

    Exception Handling

    Graphical User Interface Concepts: Part 1

    Graphical User Interface Concepts: Part 2

    Multithreading

    Strings, Characters and Regular Expressions

    Graphics and Multimedia

    Files and Streams

    Extensible Markup Language (XML)

    Database, SQL and ADO.NET

    ASP.NET 2.0, Web Forms and Web Controls

    Web Services

    Networking: Streams-Based Sockets and Datagrams

    Searching and Sorting

    Data Structures

    Generics

    Collections

    Appendix A. Operator Precedence Chart

    Appendix B. Number Systems

    Appendix C. Using the Visual Studio 2005 Debugger

    Appendix D. ASCII Character Set

    Appendix E. Unicode®

    Appendix F. Introduction to XHTML: Part 1

    Appendix G. Introduction to XHTML: Part 2

    Appendix H. HTML/XHTML Special Characters

    Appendix I. HTML/XHTML Colors

    Appendix J. ATM Case Study Code

    Appendix K. UML 2: Additional Diagram Types

    Appendix L. Simple Types

    Index



    Visual C# How to Program
    Visual C# 2005 How to Program (2nd Edition)
    ISBN: 0131525239
    EAN: 2147483647
    Year: 2004
    Pages: 600

    Flylib.com © 2008-2020.
    If you may any questions please contact us: flylib@qtcs.net