2
我使用下面的代碼來隱藏文本框,標籤和Dropdownlist。但是,我會如何隱藏日期選擇器?我可以在下面的代碼中爲datepicker做同樣的事嗎?使用其類型的隱藏日期選擇器
If (TypeOf ctrTexbox Is TextBox) Then
If isMasked Then
CType(ctrLabel, Label).Visible = True
CType(ctrTexbox, TextBox).Visible = False
Else
CType(ctrLabel, Label).Visible = False
CType(ctrTexbox, TextBox).Visible = True
End If
ElseIf (TypeOf ctrTexbox Is DropDownList) Then
If isMasked Then
CType(ctrLabel, Label).Visible = True
CType(ctrTexbox, DropDownList).Visible = False
Else
CType(ctrLabel, Label).Visible = False
CType(ctrTexbox, DropDownList).Visible = True
End If
HTML的日期選擇
<BDP:BasicDatePicker Style="z-index: 205; left: 312px" ID="dtp" runat="server" width="250px" SelectedDate="1989-01-01" DateFormat="dd/MMM/yyyy">
<TextBoxStyle CssClass="inputbox" Width="250px" /></BDP:BasicDatePicker>
在後面的代碼,'ID.visible = FALSE;' – BNN 2015-04-03 05:52:18