how can i view the variables of one vb class in another vb class in ASP.NET?

Discussion in 'ASP .Net' started by vinuta, Jan 31, 2005.

  1. vinuta

    vinuta Guest

    I have three vb classes.
    First one has a variable whose value i want to use in a function in
    third vb class which is called by the second vb class.
    e:g;
    first.aspx.vb
    second.aspx.vb
    third.vb which has a function called drawlinegraph()

    now fisrt.aspx.vb has a varible z which is initialized to some value in
    the same class. Now i am calling the dralinegraph() from second.aspx.vb.
    Now the function drawlinegraph needs to use the value of z from
    first.aspx.vb how can i do this?

    Ya how can i reference a variable which is an array in the other vb
    class?

    thanks,
    Vinuta



    --
    vinuta
    ------------------------------------------------------------------------
    Posted via http://www.codecomments.com
    ------------------------------------------------------------------------
     
    vinuta, Jan 31, 2005
    #1
    1. Advertising

  2. RE: how can i view the variables of one vb class in another vb class

    As I see from the names of your classes, two of your classes are codebehind
    classes. As such, when you go from the first page to the second, the first
    web page is no longer available. Which means you cannot use the values of the
    variables in its code behind(which are initialized in Page_Load or other
    event handlers, I suppose). Why don't you try to take the variable z in a
    seaparate class (with the logic of initializing her value), mark it as
    public, and you will get access to it from any other class, including those
    three.

    Hope that helps!
    Regards,
    Kostadin Kostov

    "vinuta" wrote:

    >
    > I have three vb classes.
    > First one has a variable whose value i want to use in a function in
    > third vb class which is called by the second vb class.
    > e:g;
    > first.aspx.vb
    > second.aspx.vb
    > third.vb which has a function called drawlinegraph()
    >
    > now fisrt.aspx.vb has a varible z which is initialized to some value in
    > the same class. Now i am calling the dralinegraph() from second.aspx.vb.
    > Now the function drawlinegraph needs to use the value of z from
    > first.aspx.vb how can i do this?
    >
    > Ya how can i reference a variable which is an array in the other vb
    > class?
    >
    > thanks,
    > Vinuta
    >
    >
    >
    > --
    > vinuta
    > ------------------------------------------------------------------------
    > Posted via http://www.codecomments.com
    > ------------------------------------------------------------------------
    >
    >
     
    =?Utf-8?B?S29zdGFkaW4gS29zdG92?=, Jan 31, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jimmy
    Replies:
    0
    Views:
    511
    Jimmy
    Mar 15, 2007
  2. RichB
    Replies:
    7
    Views:
    5,735
    dkmorris1999
    Sep 21, 2009
  3. Andy B.
    Replies:
    0
    Views:
    809
    Andy B.
    Apr 30, 2010
  4. Parthiv Joshi
    Replies:
    1
    Views:
    689
    Samuel L Matzen
    Jul 6, 2004
  5. Robert Cohen
    Replies:
    3
    Views:
    274
    Andrew Durstewitz
    Jul 15, 2003
Loading...

Share This Page