Changing global variables

J

JustinRU

Hi,

I'm pretty new to .NET and have (what I think) is a simple question. I
have a program that contains a datagrid, which is bound to different
sql queries depending on search criteria. I set an sqlStr string
variable globally (above the page load) and then alter that variable
within different subs. What I would like to know is how to keep that
global variable updated, so that I can access it in subs with its most
current content. (i.e. I set it in the page load and want a label in a
another sub to take its most current value.) Do I need to make a
function to keep the variable in and change the function each time a
set the variables to something different?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top