title: hide datepicker using its type
body: <p>I am using the below code to Hide TextBox , Label and Dropdownlist. But how would i hide a datepicker ? can i do the same for datepicker in the below code ?</p>
  
  <pre><code> 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
  </code></pre>
  
  <p>html for datepicker </p>
  
  <pre><code>  &lt;BDP:BasicDatePicker Style="z-index: 205; left: 312px" ID="dtp" runat="server" width="250px" SelectedDate="1989-01-01" DateFormat="dd/MMM/yyyy"&gt;                                                                                
    &lt;TextBoxStyle CssClass="inputbox" Width="250px" /&gt;&lt;/BDP:BasicDatePicker&gt;
  </code></pre>