Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: session.contents.remove("variable_name")


Message #1 by "Harjit Singh Grewal" <hsgrewal@g...> on Sat, 24 Mar 2001 16:58:05 +0530
I'm having a problem with session.contents.remove("variable_name")



and



session.contents.removeall()



Pls reply me soon as with your valuable answers.Thanks



Harjit







Here is the code that I'm using in my file along with the error it is 

giving to me:



<% @ enablesessionstate=3Dtrue language=3Dvbscript %>

<%

session("name") =3D "harjit"

session("lname") =3D "singh"

session("city") =3D "mohali"

session("state") =3D "punjab"





response.write session("name") & "<br>"

response.write session("lname")& "<br>"

response.write session("city")& "<br>"

response.write session("state") & "<br>"



'session.contents.Remove("name")

'session.contents.Remove("lname")

'session.contents.Remove("city")







session.contents.removeall()

%>



Microsoft VBScript runtime error '800a01b6'



Object doesn't support this property or method: 'removeall'



/collection2.asp, line 25



Message #2 by Imar Spaanjaars <Imar@S...> on Sat, 24 Mar 2001 14:08:16 +0100
Are you using ASP 2.0 on Windows NT 4.0???



Remove and RemoveAll were introduced on ASP 3.0, running only on Windows 

2000 / IIS 5.



Imar





At 04:58 PM 3/24/2001 +0530, you wrote:

>I'm having a problem with session.contents.remove("variable_name")

>

>and

>

>session.contents.removeall()

>

>Pls reply me soon as with your valuable answers.Thanks

>

>Harjit

>

>

>

>Here is the code that I'm using in my file along with the error it is 

>giving to me:

>

><% @ enablesessionstate=true language=vbscript %>

><%

>session("name") = "harjit"

>session("lname") = "singh"

>session("city") = "mohali"

>session("state") = "punjab"

>

>

>response.write session("name") & "<br>"

>response.write session("lname")& "<br>"

>response.write session("city")& "<br>"

>response.write session("state") & "<br>"

>

>'session.contents.Remove("name")

>'session.contents.Remove("lname")

>'session.contents.Remove("city")

>

>

>

>session.contents.removeall()

>%>

>

>Microsoft VBScript runtime error '800a01b6'

>

>Object doesn't support this property or method: 'removeall'

>

>/collection2.asp, line 25




  Return to Index