Workshop

IOTA^_^    

Sams Teach Yourself ASP.NET in 21 Days, Second Edition
By Chris Payne
Table of Contents
Day 19.  Separating Code from Content


This workshop will help reinforce the concepts you've covered in today's lesson. It is very helpful to understand fully the answers before moving on. Answers can be found in Appendix A.

Quiz

1:

True or false: A code-behind file must derive from the System.Web.UI.Page class.

2:

Why must you declare public variables in a code-behind for the server controls you use on an ASP.NET page?

3:

Create an @ Page directive that uses a code-behind class named MyControl, in a .vb file with the same name.

4:

What is a resource file?

5:

What does the following line do?

 dim strVar as string = Request.UserLanguages(0) 
6:

What does the resgen.exe tool do?

7:

What is the difference between CurrentCulture and CurrentUICulture?

8:

True or false: The CultureInfo.CurrentCulture is a shortcut for the System.Threading.CurrentThread.CurrentCulture object.

Exercises

[click here]

Create a currency exchange calculator for several different countries. Allow the user to enter a monetary value in one region's units, and convert to another by selecting a value from a select box. Use a resource file to store the exchange values. (Don't worry if you don't know the exchange rates, just make something up!) Use code-behind techniques!


    IOTA^_^    
    Top


    Sams Teach Yourself ASP. NET in 21 Days
    Sams Teach Yourself ASP.NET in 21 Days (2nd Edition)
    ISBN: 0672324458
    EAN: 2147483647
    Year: 2003
    Pages: 307
    Authors: Chris Payne

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