Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BC30526: Property 'Item' is 'ReadOnly'.

Status
Not open for further replies.

gagz

Programmer
Nov 21, 2002
333
US
I don't know why i'm getting this error... All i'm trying to do is basically create a logout button... its a for that shows the user some texts, 'removes' their cookie, and redirects them, though I'm getting this error on the below line (in red):
Code:
' Logout.aspx.vb
'

Imports System
Imports System.Web
Imports System.Web.HttpCookie

Namespace BMC

    Public Class Logout 
        Inherits System.Web.UI.Page
    
        Public Sub Page_Load(Sender as Object, e as EventArgs)
            'delete cookies
Response.Cookies("BusinessMeetings") = ""
Code:
'wait for a few seconds
            System.Threading.Thread.Sleep(10000000)
            'redirect
            Response.Redirect("[URL unfurl="true"]http://www.businessmeetings.com")[/URL]
        End Sub
        
    End Class
End Namespace

any help would be appreciated... thanks.
 
And something like this instead of delete ? :

Dim Cookie As HttpCookie
Cookie = Request.Cookies(CookieGlobalName)
If Cookie Is Nothing Then
' there is no cookie !
Else
Cookie = New HttpCookie(CookieGlobalName)
End If
Cookie.Values('empty') = 1
Response.Cookies.Add(Cookie) Edward@de-leau.com
 
so what exactly is that doing? writing over the other cookie with an empty one?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top