ASP Net Controls ASP.Net Tutorial

<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>

   'declare connection
   dim Conn as new OleDbConnection( _
            "PROVIDER=Microsoft.Jet.OLEDB.4.0;" _
            & "DATA SOURCE=" _
            & Server.MapPath("EmployeeDatabase.mdb;"))
   
   sub GetData(Sender as Object, e as EventArgs) 
      dim objCmd as OleDbCommand = new OleDbCommand _
         ("select * from employee where ID = @ID", Conn)
      dim objReader as OleDbDataReader
      
      dim objParam as OleDbParameter
      objParam = objCmd.Parameters.Add("@ID", OleDbType.Integer)
      objParam.Direction = ParameterDirection.Input
      objParam.Value = tbID.Text
           
      try
         objCmd.Connection.Open()
         objReader = objCmd.ExecuteReader
         
         dgData.DataSource = objReader
         dgData.DataBind()
       
         objReader.Close
         objCmd.Connection.Close()
      catch objEx as FormatException
         lblMessage.Text = objEx.Message
      catch objEx as OleDbException
         lblMessage.Text = "Database error!"
      catch objEx as Exception
         lblMessage.Text = "Unknown error!"
      end try      
   end sub


   
               maintainstate=false />

      Enter an ID:          AutoPostBack=True
         OnTextChanged=GetData />
               BorderColor="black" 
         GridLines="Vertical" 
         width="100%"
         Font-Name="Arial" 
         Font-Size="8pt" 
         HeaderStyle-BackColor="#cccc99"
         ItemStyle-BackColor="#ffffff"
         AlternatingItemStyle-Backcolor="#cccccc"
         AutoGenerateColumns="true" />