How to access a nested MultiView control in ASP.NET
- by Eden
I have an asp.net page with a multiview control nested within another multiview control. In my code behind I'm trying to access the inner most multiview control to set it's ActiveViewIndex. The problem I'm having is that I don't seem to be able to access the control. It's not available directly via this.MySubMultiview. And attempts to use this.FindControl or this.MyOuterMultiView.FindControl doesn't work.
Html:
...
...
Code behind:
MultiView multiAddress = (MultiView)this.MultiViewMain.FindControl("MultiViewAddress");
multiAddress.ActiveViewIndex = 1;