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.
True or false: A code-behind file must derive from the System.Web.UI.Page class.
Why must you declare public variables in a code-behind for the server controls you use on an ASP.NET page?
Create an @ Page directive that uses a code-behind class named MyControl, in a .vb file with the same name.
What is a resource file?
What does the following line do?
dim strVar as string = Request.UserLanguages(0)
What does the resgen.exe tool do?
What is the difference between CurrentCulture and CurrentUICulture?
True or false: The CultureInfo.CurrentCulture is a shortcut for the System.Threading.CurrentThread.CurrentCulture object.
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!