Asp Control ASP.Net

<%@ Import namespace="System.Data" %>
<%@ Import namespace="System.Data.SqlClient" %>

  Calendar: Hire Dates
  
    

Calendar: Hire Dates


    
                         Rows="7"
                   Autopostback="True" />
      
                          SelectionMode = "None" />
    
  


Sub Page_Load(Source As Object, E As EventArgs)
  Dim strConnection As String = ConfigurationSettings.AppSettings("YourDataName")
  Dim objConnection As New SqlConnection(strConnection)
  Dim strSQL As String = "SELECT ID, LastName, FirstName, HireDate FROM Employee;"
  Dim objAdapter As New SqlDataAdapter(strSQL, objConnection)
  Dim objDataSet As New DataSet("dsEmployees")
  objAdapter.Fill(objDataSet, "dtEmployees")
  If Not IsPostBack Then
    lstEmployees.DataSource = objDataSet
    lstEmployees.DataTextField = "LastName"
    lstEmployees.DataBind()
  Else
    Dim datHireDate As Date
    datHireDate = Convert.ToDateTime( _
objDataSet.Tables("dtEmployees").Rows(lstEmployees.SelectedIndex)("HireDate"))
    lblSelectedDate.Text = _
objDataSet.Tables("dtEmployees").Rows(lstEmployees.SelectedIndex)("LastName")
    calHire.VisibleDate = datHireDate
    calHire.SelectedDate = datHireDate
    lblSelectedDate.Text &= " hired on " & datHireDate
  End If
End Sub