Results 1 to 6 of 6

Thread: Global Variable

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    Global Variable

    I'm trying to declare a Global variable in my Global.aspx page:

    Public OrgBidDate as Date

    then on another page I have:

    orgBidDate = txtBidOpenDate.Text

    but I get an error that orgBidDate is not declared.

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Try creating an application variable. Then you can access it from anywhere.

  3. #3

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075
    you mean like a session variable?

  4. #4
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Yes, like a session variable, but it is accessable to the whole app (many different sessions) instead of to just one user.
    http://msdn.microsoft.com/library/de...ationstate.asp

  5. #5

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075
    thanks Hell...I ended up using a Global Variable in a module...that worked fine...

    thanks..

  6. #6
    Member Ooogaleee's Avatar
    Join Date
    Nov 2002
    Location
    Jacksonville, FL
    Posts
    52
    In case you're interested, the syntax for declaring a session variable is:


    Session("VarName")=VarType


    for instance...


    Session("UserName")=String

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