Recent Posts
Calendar
October 2009
S M T W T F S
« Sep   Nov »
 123
45678910
11121314151617
18192021222324
25262728293031

Archive for October 12th, 2009

HttpContext.Items[] vs Session[]

ETHN0171

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.

Read the rest of this entry »