Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Can i control the application variables dynamicly

Can i control the application variables dynamicly

Scheduled Pinned Locked Moved Web Development
question
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    david fox
    wrote on last edited by
    #1

    i want to destroy the application variables at anytime, can i do it and how?

    R L 2 Replies Last reply
    0
    • D david fox

      i want to destroy the application variables at anytime, can i do it and how?

      R Offline
      R Offline
      Ryan Johnston 0
      wrote on last edited by
      #2

      Which application variables? What are you trying to do? Ryan Johnston

      D 1 Reply Last reply
      0
      • R Ryan Johnston 0

        Which application variables? What are you trying to do? Ryan Johnston

        D Offline
        D Offline
        david fox
        wrote on last edited by
        #3

        For example, I create a application variable Application("message") to store inforamtion,so under some situation I want to destory this application variable, can I do it and how?

        T 1 Reply Last reply
        0
        • D david fox

          For example, I create a application variable Application("message") to store inforamtion,so under some situation I want to destory this application variable, can I do it and how?

          T Offline
          T Offline
          Todd Smith
          wrote on last edited by
          #4

          Heh. You mean you want to kill some annoying message box? Ya, it's possible in some cases. Todd Smith

          D 1 Reply Last reply
          0
          • T Todd Smith

            Heh. You mean you want to kill some annoying message box? Ya, it's possible in some cases. Todd Smith

            D Offline
            D Offline
            david fox
            wrote on last edited by
            #5

            No, I did not mean that. For example, I create a application variable to store a array. I want to kill this variable to gain the allocated memory back. I want to do it at anytime, not controlled by Application_OnEnd.

            1 Reply Last reply
            0
            • D david fox

              i want to destroy the application variables at anytime, can i do it and how?

              L Offline
              L Offline
              lizhill
              wrote on last edited by
              #6

              Yes, sure you can. You can use these method in ASP (3.0) <% ' to remove all application variables in Application collection Application.Contents.RemoveAll() %> or <% ' to remove single application variable by name or index number Application.Contents.Remove("name") ' if you know the index of it you can use ' to remove first item in application collection. ' index of application variable start from 1 not zero. Application.Contents.Remove(1) %> Hope it help!:) ___________________________________________ lizhill

              D 1 Reply Last reply
              0
              • L lizhill

                Yes, sure you can. You can use these method in ASP (3.0) <% ' to remove all application variables in Application collection Application.Contents.RemoveAll() %> or <% ' to remove single application variable by name or index number Application.Contents.Remove("name") ' if you know the index of it you can use ' to remove first item in application collection. ' index of application variable start from 1 not zero. Application.Contents.Remove(1) %> Hope it help!:) ___________________________________________ lizhill

                D Offline
                D Offline
                david fox
                wrote on last edited by
                #7

                Thank you very much That's what I want:laugh:

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups