I'm reading a book and trying out the exercises.
One @helper code uses HttpContext.Current.Request[option]
while mucking around with the code, an equivalent (and simpler)
string varState = Request.Form[option];
could accomplish the same thing.
So my question is why is HttpContext.Current needed? What benefit does it give you?
According to MSDN, the class HttpContext "Encapsulates all HTTP-specific information about an individual HTTP request."
But if the varState = Request.Form[option] can also access the same form value, why bother with adding HttpContext.Current?
What cases is this needed or required? Looking for insights.
Go to the complete details ...