Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how can i view the variables of one vb class in another vb class in ASP.NET?

Reply
Thread Tools

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

 
 
vinuta
Guest
Posts: n/a
 
      01-31-2005

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
------------------------------------------------------------------------

 
Reply With Quote
 
 
 
 
=?Utf-8?B?S29zdGFkaW4gS29zdG92?=
Guest
Posts: n/a
 
      01-31-2005
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
> ------------------------------------------------------------------------
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MVC2: linking from one area view to another area view Andy B. ASP .Net 0 04-30-2010 07:46 AM
Getting reference of eclipse plugin view or its component from another eclipse plugin view? Jimmy Java 0 03-15-2007 11:04 PM
How to make a week view and day view calendar just like month view calendar in .NET ? Parthiv Joshi ASP .Net Web Controls 1 07-06-2004 03:15 PM
Using One XSLT and multiple XML Problem (One is XML and another one is XBRL) loveNUNO XML 2 11-20-2003 06:47 AM
Passing value from one script on one page to another script on another page. Robert Cohen ASP General 3 07-15-2003 01:46 PM



Advertisments