Mark Rae [MVP] wrote:
"Frank Moyles" <fg******@nospam.comwrote in message
news:ce*********************@bt.com...
>What is the equivalent for retrieving server side variables?
For example in PHP, one such predefined variable is:
$_SERVER['REMOTE_ADDR']
string strRemoteAddr = Request.ServerVariables["REMOTE_ADDR"].ToString();
The ServerVariables collection is a collection of strings, so just do:
string strRemoteAddr = Request.ServerVariables["REMOTE_ADDR"];
Besides, the collection returns null if there is no item by the
specified name, and calling ToString on a null reference causes an
exception.
--
Göran Andersson
_____
http://www.guffa.com