CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2008
    Posts
    1

    Error in displaying Application contents

    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*

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: Error in displaying Application contents

    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.

    Code:
    For Each item in Application.Contents
      Response.Write item & "<br />"
    Next
    Also, please remember to use &#91;code&#93; tags when posting code. It helps keep things clean and understandable.

    &#91;code&#93;
    Your code goes here
    &#91;/code&#93;
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured