TAILIEUCHUNG - Professional ASP.NET 1.0 Special Edition- P9

Professional Special Edition- P9:Those of us who are Microsoft developers can't help but notice that .NET has received a fair amount of visibility over the last year or so. This is quite surprising considering that for most of this period, .NET has been in its early infancy and beta versions. I can't remember any unreleased product that has caused this much interest among developers. And that's really an important point, because ignoring all the hype and press, .NET really is a product for developers, providing a great foundation for building all types of applications | HorizontalAlign Rows TableRow Cells HorizontalAlign VerticalAlign - none - TableCell ColumnSpan HorizontalAlign RowSpan Text VerticalAlign Wrap - none - Literal Text - none - PlaceHolder - none - - none - It should be obvious from the names what most of the properties are for however we will examine each control in the following sections and indicate some of the things to look out for when we use them. The sample application which we have already seen in Chapter 5 contains pages for most of the Web Form controls and we will be using these pages to demonstrate the properties of each control You can get the sample files for this chapter which contain this application from http Books isbn 1861007035. The application is in the folder named server-controls. You can also run many of the examples online at http profaspnet . Using the Web Form Controls When we want to add an Web Form server control to our page we define it just like an ordinary HTML element by adding the appropriate attributes for the properties we want to set. For example we can add an ASP TextBox control to the page to output an HTML textbox element using ASP TextBox id MyTextBox BackColor Red Text Enter a value. runat server Notice that the Web Form controls all have the ASP namespace prefix uppercase or lowercase it doesn t matter which to denote that they are from the namespace. One thing that makes working with the HTML server controls we used in the previous chapter easy is that all the properties are simple String values. For example we specify the string value right for the Align property of an HtmlImage control to align the image to the right of any following page content. As you will see in this section however it is not always as straightforward with the Web Form controls. Many of the properties for the ASP Web Form controls use values from an enumeration or a reference to an object. Setting .

19    16    0
182    13    0
138    6    0
3    7    0
142    12    0