home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

vb.net structures

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2073
Discussions: 200,959, Posts: 2,379,528, Members: 246,329
Old February 27th, 2005, 03:28 PM   Digg it!   #1 (permalink)
Member
 
Join Date: Oct 2003
Posts: 263
vb.net structures

Hi guys,

having a quick issue with an application im building. Basically i am using a structure to hold 2 variables that i use througout the application.

Public Structure uses
user_name as string
admin_rights as boolean


I set the public structure variables on the Log-In page.


When the user is validated, etc. it takes you to the Main Page.


When i check to see if the variables values are still in place on the main page
only the admin rights variables is correct. The user_name variable is nothing.

I have a feeling the .dispose command on the Log-In page is killing the user name variable. HOwever how come the admin right variable is staying through the form change? Both variables are set up the same within the structure. Can structures only hold a certain data type ???

Anyone have a suggestions...Please help if you can...

Log In form starts(structure variables are set)-->Loginform disposed, Main form loads....variables are checked only admin rights as a value in it.

When i check the variables right after the variables are set in log in they are correct.

I stepped through the code and both variables are being set correctly...


Thanks for help guys.
amtrac24 is offline   Reply With Quote
Old February 27th, 2005, 06:11 PM     #2 (permalink)
Member
 
Join Date: Sep 2002
Posts: 364
Well, since admin_rights is of type boolean, it only has 2 possible values, and it is probably initialized to the same value which you are also validating. Where are you storing these? In session variables or what?
Creosote is offline   Reply With Quote
Old February 27th, 2005, 06:57 PM     #3 (permalink)
Member
 
Join Date: Oct 2003
Posts: 263
yeah i didnt think about that...i tried storing them on a module, the login page, and main page but none of them changed anything. I just dont understand since the structure is public how do the values get erased? I tried just using 2 global variables on a module page and it works. the values never get erased. Why should a structure act any different?
amtrac24 is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Minor earthquake in Midwest vass0922 IMO Community 17 July 6th, 2004 03:14 AM
What to do with 9/11 hijackers' remains GroundZero3 IMO Community 57 August 28th, 2002 08:41 AM
Help with creating graphics files osprey4 Applications and Operating Systems 11 July 13th, 2002 01:27 PM
[UD] what is this korgul Distributed Computing 10 January 26th, 2002 03:38 PM
Windows StartMenu inquisitive goat General Tech Discussion 4 December 30th, 2001 11:26 AM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2969)
The disrespect of Obama by Russian .. (42)
Making Health Care Worse (178)
Wireless Televisions. (12)
CPU fan stops spinning randomly (9)
Regular Build (11)
windows 7 problem (7)
Laptop with wireless problem. (5)
windows vista security holes (13)
Is the PSU I received dead? (12)
Print spooler problem (15)
radeon x850xt platinum & shader.. (6)
HIS HD5770 graphic card question (15)
Install XP pro and a Vista laptop ?.. (11)
Recent Discussions
Nvidia GTX 260 problem (0)
windows vista security holes (13)
Kingston Bluetooth Dongle Driver (1)
Multiple Restarts Required at Boot (3)
Open With ..... Win7 (1)
webcam (0)
upgrade for hp a6101 (0)
Laptop with wireless problem. (5)
Modern Warfare 2: Who Bought It? (64)
tv not turn on-makes clicking sound (2)
CPU fan stops spinning randomly (9)
EVGA 9800 gtx help with finding a goo.. (11)
Regular Build (11)
Help with onclick and buttons (0)
Virus advise (8)
My monitor won't turn on after instal.. (1)
Internet Lost (3)
Dept. of HS: NSA 'Helped' Develop Vis.. (16)
Point and Shoot Camera Suggestions. (4)
Ideal cheap graph card for PC-Gaming? (18)
radeon x850xt platinum & shader 3 (6)
Graphics Card Upgrade Question (4)
For Sale BFG GTX285 OC2 with 10 year .. (3)
How to convert MP3's (4)
Wireless Televisions. (12)


All times are GMT -4. The time now is 09:44 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28