I have a Wizard control with several steps. On the first step I have two RadioButtonList controls (they both contain two items: Yes and No). If the user selects yes (index 0) the corresponding row will be come unhidden. If they select no (index 1) the corresponding row will become hidden. You can see the code below that I am running in my Form.Load method. This is tested and working correctly.
I am trying to add the same functionality for a third RadioButtonList on another step further in the Wizard. I cannot make this work using the same method, and I'm assuming it's because that RadioButtonList doesn't exist on my Form.Load because it's on a future step.
Can anybody tell what I am doing wrong, and what is the prefered way of doing this?
However, on one of my wizard steps I have functionality that includes a postback, and my attribute seems to be lost after postback. This would indicate that I would need to include this in the Form.Load instead of in the ActiveStepChanged event, correct?
I have placed the switch statement in the PreRender event of the Wizard and this seems to work as I want it to. I think your latest solution would work as well, but I think I may keep it in the PreRender unless you have a good reason not to.
Thanks for your help! I learned a lot.
aibusinesssolutions
It will work in PreRender as well, that's the thing about asp.net, there's always at least 10 ways do do the same thing. :)