I will be using n amount of radiobuttons in a form. When a radiobutton is checkekd, I want to display a panel with different controls on it. I am using 1 event handler for each of the radiobuttons. I put the panel name (of panel I want to display) in the "tag" property of the radiobutton.
The question I have is:
How would I do something along the lines of
I know this won't work, because Tag is a string of the control name and not the actual control itself. If this possible though without looping through each panel to find out if tag matches the panels name to get the control?Code:(((Panel)(RadioButton)sender).Tag).Visible = true;
Thanks




Reply With Quote