okay, it can print out ip in LET, but it is empty in GET,
private sub Class_Initialize
Dim objXMLHTTP
Dim coordinates
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
'ip = Request.ServerVariables("REMOTE_ADDR")
Response.Write IPAddress
thx
Public Property Let IPAddress(inValue) ip = inValue Response.Write "LET:" & ip & "<BR>"End PropertyPublic Property Get IPAddress() IPAddress= ip Response.Write "GET:" & IPAddress & "<BR>"End Property
I am sorry, I just realized that it is still not working. I can get ip in class except in private sub Class_Initialize, any ideas? thx
strickdd
The Class_Initialize function is called before setting the IPAddress property and is used to set the default values of the variables in the class. I believe you can create a constructor for the class that takes in the IPAddress value and sets the property.
End Function