View Full Version : Property Item is 'ReadOnly'
lionheart
03-19-2003, 07:29 AM
What is meant by Property 'Item' is 'ReadOnly'.
Dim vRemote
Response.Cookies("vRemote") = Request.ServerVariables("REMOTE_ADDR")
According to SDK HELP file ...
If the variable is a read-only variable, the assignment must take place in a Shared or instance constructor appropriate for the type of the variable; otherwise a compile-time error occurs.
Can anyone show how to do this?
bruce
03-19-2003, 11:15 AM
This means that you cannot assign value to the property.
Response.cookie allows your to retrieve a cookie.
I am not sure what you are trying to do, so I can't recommend any solution. What is that you are trying to achieve.?
[b]quote:Originally posted by lionheart
What is meant by Property 'Item' is 'ReadOnly'.
Dim vRemote
Response.Cookies("vRemote") = Request.ServerVariables("REMOTE_ADDR")
According to SDK HELP file ...
If the variable is a read-only variable, the assignment must take place in a Shared or instance constructor appropriate for the type of the variable; otherwise a compile-time error occurs.
Can anyone show how to do this?
</blockquote id="quote"></font id="quote">
lionheart
03-20-2003, 12:30 PM
I have a default.aspx where it is consists of several 'include files'. (Actually I am upgrading my current ASP files to .NET.)Everytime a user click a link on this page(DEFAULT.ASPX), it will load the same page, however as this page is loaded it will now decide as to what 'included file' be displayed depending on the value of a QueryString returned. As to the code below
Dim vRemote
Response.Cookies("vRemote") = Request.ServerVariables("REMOTE_ADDR")
The purpose of this is simply to store the IP address of the user to a cookie called "vRemote" and which at a later time would be used to determine if the same IP (or user) is loading the page. If so, then I will not increment my counter.
Thanks.
vBulletin® ©Jelsoft Enterprises Ltd.