title: How do I show a few of items (out of many) in my database table?
body: <p>C# visual studio 2012 professional asp.net</p>
  
  <p>I have a table containing usernames: Josh, Jeremy, Jared, Justin...</p>
  
  <p>And I created a web page gridview that shows the entire table but I only want it to show Justin and nothing else.</p>
  
  <p>How do I do this?</p>
  
  <p>Here's some code that didn't work:</p>
  
  <pre><code>SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True");
      SqlCommand cmd = new SqlCommand();
      cmd.Connection = con;
      SqlDataReader rs;
  
      con.Open();
  
      SqlParameter uName = new SqlParameter("paramFName", Account.Text);
  
      cmd.Parameters.Add(uName);
  
      cmd.CommandText = "SELECT * FROM Transactions WHERE FName=@paramFName";
      rs = cmd.ExecuteReader();
  
      cmd.Parameters.Clear();
      rs.Close();
  </code></pre>
  
  <p>Am I supposed to create a view of the table? I tried but wasn't successful.</p>
  
  <p>tips?</p>