SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 153 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

Transfer, Server.HtmlEncode, and
Server.MapPath
CHAPTER 3 ?–  A SP.NET S TATE MANAGEMENT 89
Web forms and controls have different methods to obtain a reference to the HttpContext
instance. A static property, HttpContext.Current, returns an instance of the current HttpContext to
any class that is interested, even if it is not inside an ASP.NET page. For example, the Current
static property can be referenced in helper classes used within the web form page??™s server-side
code to gain access to any of the properties in Table 3-2, such as Cache. This ease of access allows
for more modular code that??™s easier to read.
Controls inherit a Context property from System.Web.UI.Control that is mapped to the
current instance of HttpContext as a convenient reference for use in server control development.
The Page class has a Context property as well, but it goes one step further by providing
properties that are mapped to their Context counterparts, such as Request and Response.
Server-Side State Considerations
In general, we do not recommend using server-side state management techniques in server
control development, especially when most, if not all, state storage requirements can be met
using client-side state management, which we discuss in the next section.


Pages:
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6