Chapter 4: Writing Code


Overview

Adding controls to pages and setting properties are only part of what's involved in creating an ASP.NET web site. The true power of ASP.NET comes from the code you write to make
pages dynamic.

This chapter is all about doing some real work in Visual Basic .NET (or VB.NET, for short). You'll learn the most common elements of the Visual Basic .NET language, and then in the next two chapters you'll see how you can use the concepts learned in this chapter, coupled with methods of storing information temporarily, to make your code more powerful.

In this chapter you will learn:

  • How to write functions and procedures that group a common set of tasks together

  • How to make simple choices in an If ... Then statement, in other words, how to run a piece of code if certain conditions are met.

  • How to use Select ... Case statements for multiple choices, running different blocks of code based on the value of an expression.

  • How to perform repetitive tasks using For ... Next and Do ... While loops

We've got a lot to cover in this chapter, and we're going to be moving pretty quickly. You probably won't remember every single thing when you read it the first time, but you will grasp the main concepts – and you can always refer back to this chapter to get the details when you need them.




Beginning Dynamic Websites with ASP. NET Web Matrix
Beginning Dynamic Websites: with ASP.NET Web Matrix (Programmer to Programmer)
ISBN: 0764543741
EAN: 2147483647
Year: 2003
Pages: 141

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