How to access a nested MultiView control in ASP.NET

Posted by Eden on Stack Overflow See other posts from Stack Overflow or by Eden
Published on 2010-04-30T23:01:22Z Indexed on 2010/04/30 23:07 UTC
Read the original article Hit count: 223

Filed under:
|
|

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;

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-controls