我已经使用了一个asp.net向导控件,我已经在向导步骤中使用了许多面板。每个面板都有一个具有样式显示的类:none。当用户单击“+”按钮我切换类,并将可见性更改为Display:Block,并且此工作正常。现在,为了从面板读取控件的值,我试图只读取其面板设置为可见的控件。但是,这样做不似乎工作就显示,即使它有风格显示所有面板可见真:找出面板是否可见
我想这没有:
if ((this.Form.FindControl("ContentPlaceHolder1").FindControl("wizard").FindControl("panel" + i)).Visible)
{
//where i is the current count.I have named panel in a continuous order like panel1,panel2....etc This code executes even if the panel is hidden in browser
}