Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get variable names from form

Status
Not open for further replies.

mander23

MIS
Jan 30, 2005
28
US
I need to get all of the variable names that are declared in a form. I want to be able to put a value in a database like variable 'A' equals xyz. Then at runtime loop through the variables until a variable is equal to the database and set it. I know how to get all of the controls and loop through them but haven't found how to do variables yet. Any help would be appreciated. Thank you.
 
I think you are a little confused, or else i am a little confused.

Do you mean the variables that are part of the form (Visible) or do you mean the variables that are actually members of the class for the codebehind for the form?

Form (visble) - There are no actual variables. You get the values directly from the controls, usually with a .Text

Class Public variables - Here are a couple links to get you started.

-The answer to your problem may not be the answer to your question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top