Question Passing variables between procedures using a standard button

Paradox 99

New member
Joined
Jul 1, 2011
Messages
3
Programming Experience
1-3
Hi all, my first time here.
I've been coding for years, but in many areas, I am still a newbie in my understanding, and I think the problem I have here probably demonstrates that pretty well - I'm hoping there's a simple solution, but wasn't sure where to search for the answer.

I have a created a dictionary list of classes called "centres", and when a button is pushed on my web page, it pulls some data from a database to populate it, after which it loads up the index values into a list box. So far so good. I have my listbox with all the centre numbers.

All I wanted to do was click on another button that sees whichever centre was chosen from the listbox, and then populate a series of textboxes to show all the properties of that specific choice. The problem is that the button is a private procedure and it cannot see any of the data within the "centres" dictionary. How do I pass my dictionary data into the button's procedure? (Because I'm not actually calling the buttons procedure I don't know how to pass the data into it).

All help greatly appreciated. Thanks!
 
Ok, so I have an idea.Can I store my dictionary somewhere on the actual webform and then access it from a protected sub? This works when I try it with a simple textbox and a string, but is there some way I can do this with an object? (my dictionary?)
Or is there a better/more efficient way of doing this?

Thanks again.
 
Anybody? Is there a solution to this? ASP does seem to be rather restrictive in this area. I can't believe that I'm not able to process some data after clicking one button and then unable to use the results after clicking another button!
 
Back
Top