title: Textbox KeyPress event
body: <p>I want to write following code in textbox key press event.</p>
  
  <p>{</p>
  
  <pre><code>    Loc = Server.MapPath("App_Data\\State.mdb");
      string connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Loc + ";";
      DataSet ds = new DataSet();
      OleDbConnection conn = new OleDbConnection(connectionString);
      conn.Open();
      OleDbCommand cmd = new OleDbCommand();
      cmd.Connection = conn;
      query = "Select * from MyCity";
      OleDbDataAdapter adp = new OleDbDataAdapter(query, conn);
      adp.Fill(ds);
      Repeater1.DataSource = ds;
      Repeater1.DataBind();
      conn.Close();
  
  }
  </code></pre>
  
  <p>I have google 100 times and find many code regarding generating textbox key press event and they all do good but iam unable to associate the above code with textbox keypress event.Also the above code is written in .aspx.cs* file.</p>
  
  <p>If any one can write the above code in .aspx file, that will also  be a great help.</p>
  
  <p>Any help is a great help....Many thanks.....</p>