Last night, one of my clients assigned me a problem that I thought was going to require one solution, and in the end it was just poor programming. But the process reminded me of the need for good debugging skills. Just how do you know where the performance problem is?
Since .NET first became available, passing data around during a request has become a lot easier. The ability to set a property has made that so. Still, there are times when setting a property just won’t do the trick.
One such time is getting data from the middle tier back up to the view separate from a DataBinding operation. That is, you databind a control to the middle tier and that method needs to set a value that will be used elsewhere in the view, not in the item that is being bound.
The natural, obvious tendency is to set a session variable. But there is a better way.