Click to See Complete Forum and Search --> : Error in displaying Application contents


winprem
October 20th, 2008, 12:46 PM
Hello!
I am trying to display the names and the values of Application variables from ASP but get the below error message...

Object doesn't support this property or method

For Each item in Application.Contents
Response.Write item & " - " & Application.Contents(item) & "<BR>"
Next

Could you please help.
Many Thanks

*not sure if i am posting the message in correct category as didnt found ASP thread to post*

PeejAvery
October 20th, 2008, 09:05 PM
There is an ASP.NET forum, but this is ASP which is a server-side scripting language. It is in the correct forum. Although, sometimes ASP.NET will get you a better answer because of the users starting with plain ASP.

Concerning your problem...item has already been set as the current content. Why are you attempting to access it again? Try the following instead.

For Each item in Application.Contents
Response.Write item & "<br />"
Next

Also, please remember to use [code] tags when posting code. It helps keep things clean and understandable.

[code]
Your code goes here
[/code]