O'Reilly logo

ASP.NET for Web Designers by Peter Ladka

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

Code Separation and Using Code-Behind

As we’ve discussed before, ASP.NET has provided a really cool way to keep code separate by changing the paradigm from an inline, interpreted language to an object/event-oriented paradigm. But ASP.NET doesn’t stop there. It provides another level of separation of code and content if you want to use it. It’s called the code-behind technique.

This subject was mentioned briefly in Chapter 1 and also appeared in a little example, but here the code-behind technique is dissected so you can fully understand what’s happening.

The following is an example of a typical ASP.NET page that doesn’t utilize any code-behind techniques. It has an ASP:Label control that you’re familiar with, a few server controls, and a button ...

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