O'Reilly logo

Programming Microsoft® ASP.NET 3.5 by Dino Esposito

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HTML Controls

At first sight, HTML server controls look like HTML tags except for the extra runat=server attribute. Although it's true that they look the same, the additional runat attribute makes a huge difference. As mentioned, in ASP.NET by simply adding the runat attribute, you can bring to life otherwise-dead HTML text. Once transformed into a living instance of a server-side component, the original tag can be configured programmatically using an object-oriented approach. By design, HTML controls expose a set of methods and properties that carefully reflect the HTML syntax. For example, to set the default text of an input form field you use a property named Value instead of the more expressive Text. The name of the server control is determined ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required