Public variable = application("variable") ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • THY

    #1

    Public variable = application("variable") ?

    Hi,

    I am having some problem, I declare few variable in a public module and use
    them in the web application. But after that I found that the variable
    declared in public variable = application("va riable"), and it will be shared
    by all user ... but I am not very sure about it, anyone know it ?

    Thanks,
    Tee


  • Jim Cheshire [MSFT]

    #2
    RE: Public variable = application(&qu ot;variable&quo t;) ?

    Tee,

    Any member in a module in VB.NET is shared by default. Here's a link to
    the .NET Framework documentation that explains this:

    http://msdn.microsoft.com/library/de...us/vbcn7/html/
    vaconsharedmemb ers.asp

    Jim Cheshire [MSFT]
    Developer Support
    ASP.NET
    jamesche@online .microsoft.com

    This post is provided as-is with no warranties and confers no rights.

    --------------------[color=blue]
    >From: "THY" <thy@streamyx.c om>
    >Subject: Public variable = application("va riable") ?
    >Date: Fri, 31 Oct 2003 05:40:54 +0800
    >Lines: 11
    >X-Priority: 3
    >X-MSMail-Priority: Normal
    >X-Newsreader: Microsoft Outlook Express 6.00.3790.1069
    >X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.3790.1069
    >Message-ID: <OVaO25ynDHA.26 28@TK2MSFTNGP10 .phx.gbl>
    >Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
    >NNTP-Posting-Host: 219.95.13.211
    >Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
    >Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1876 61
    >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
    >
    >Hi,
    >
    >I am having some problem, I declare few variable in a public module and use
    >them in the web application. But after that I found that the variable
    >declared in public variable = application("va riable"), and it will be[/color]
    shared[color=blue]
    >by all user ... but I am not very sure about it, anyone know it ?
    >
    >Thanks,
    >Tee
    >
    >
    >[/color]

    Comment

    • THY

      #3
      Re: Public variable = application(&qu ot;variable&quo t;) ?

      Sorry, I got the following error while visit the url.

      Directory Listing Denied
      This Virtual Directory does not allow contents to be listed.


      and by the way, your shared by default is meant the variable shared by all
      user ? or shared by all any other web forms ?

      thanks,
      Tee


      "Jim Cheshire [MSFT]" <jamesche@onlin e.microsoft.com > wrote in message
      news:UruEpcznDH A.2828@cpmsftng xa06.phx.gbl...[color=blue]
      > Tee,
      >
      > Any member in a module in VB.NET is shared by default. Here's a link to
      > the .NET Framework documentation that explains this:
      >
      >[/color]
      http://msdn.microsoft.com/library/de...us/vbcn7/html/[color=blue]
      > vaconsharedmemb ers.asp
      >
      > Jim Cheshire [MSFT]
      > Developer Support
      > ASP.NET
      > jamesche@online .microsoft.com
      >
      > This post is provided as-is with no warranties and confers no rights.
      >
      > --------------------[color=green]
      > >From: "THY" <thy@streamyx.c om>
      > >Subject: Public variable = application("va riable") ?
      > >Date: Fri, 31 Oct 2003 05:40:54 +0800
      > >Lines: 11
      > >X-Priority: 3
      > >X-MSMail-Priority: Normal
      > >X-Newsreader: Microsoft Outlook Express 6.00.3790.1069
      > >X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.3790.1069
      > >Message-ID: <OVaO25ynDHA.26 28@TK2MSFTNGP10 .phx.gbl>
      > >Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
      > >NNTP-Posting-Host: 219.95.13.211
      > >Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
      > >Xref: cpmsftngxa06.ph x.gbl[/color][/color]
      microsoft.publi c.dotnet.framew ork.aspnet:1876 61[color=blue][color=green]
      > >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
      > >
      > >Hi,
      > >
      > >I am having some problem, I declare few variable in a public module and[/color][/color]
      use[color=blue][color=green]
      > >them in the web application. But after that I found that the variable
      > >declared in public variable = application("va riable"), and it will be[/color]
      > shared[color=green]
      > >by all user ... but I am not very sure about it, anyone know it ?
      > >
      > >Thanks,
      > >Tee
      > >
      > >
      > >[/color]
      >[/color]


      Comment

      Working...