473,320 Members | 2,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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


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

Nov 19 '05 #1
1 1144
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
------------------------------------------------------------------------

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tony Marston | last post by:
For those who you thought my method of implementing OO principles in PHP was totally wrong - see http://www.tonymarston.co.uk/php-mysql/good-bad-oop.html for details, you can now read...
4
by: John Smith Jr. | last post by:
Could someone enlighten me what the difference between viewstate[" and session[" variables in terms of use, performance, and rule of thumb, from what I understand viewstate has overhead to it, and...
17
by: Davíð Þórisson | last post by:
now in my web I have some global variables to be used in many different subpages, in the old ASP I simply loaded a variables.asp file into memory using the eval() function. Now I'd like to use XML...
10
by: dwok | last post by:
Does anyone know of a good article that discusses creating a "Tree View" control in ASP.NET? Or perhaps a Tree View Control that comes with source code? I have come across a lot of tree controls...
17
by: Woody Splawn | last post by:
I am finding that time after time I have instances where I need to access information in a variable that is public. At the same time, the books I read say that one should not use public variables...
0
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another...
12
by: Doug | last post by:
Hi, I learned a little about the model view presenter pattern at a conference this last week and am experimenting with it. It's working pretty well but I have a question. I am trying to use...
18
by: MajorSetback | last post by:
I am using the Redhat version of Linux and GNU C++. It is not clear to me whether this is a Linux issue or a C++ issue. I do not have this problem running the same program on Windows but...
55
by: Zytan | last post by:
I see that static is more restricted in C# than in C++. It appears usable only on classes and methods, and data members, but cannot be created within a method itself. Surely this is possible in...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.