我已經使用了一個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
}