Creating an interface that we'll use internally to view and modify contents of a database. The page uses the Wizard Control and a dropdown list to determine which clients information to display in the Wizard.
Current, I have a page level variable like this:
public static String selectedclient;
In this way, I can easily preserve which client is selected from the dropdown list between postbacks. As it is, the program works fine. The functionality is fulfilled. I just keep reading that such public static page level variables are a bad idea, and that it has something to do with multithreading. However, I've yet to see a problem or have any issues.
I really want to do this program "right" (good style), as this finished product will be used for years. Is it going to come back to haunt me in the future if I leave it like it is? If I need to change it, what would be a good way to preserve the same functionality?
One thing I'm thinking is that, any place where I need the selectedclient information, I could just use ClientDDList.SelectedValue.ToString(). But before I go and replace every selectedclient with ClientDDL.SelectedValue.ToString(), I'd like some advice on this issue.
View Complete Post