title: verify if username exist to show the database or sho table to field
body: <p>I have this table which contains a few's questions:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;&lt;td&gt;&lt;b&gt;Utilizador:&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;asp:Label ID="username" runat="server"&gt;&lt;/asp:Label&gt;&lt;/td&gt;&lt;/tr&gt; 
      &lt;tr&gt;&lt;td&gt;&lt;b&gt;Telefone da Empresa:&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;asp:TextBox ID="empresa" runat="server" MaxLength="13"&gt;&lt;/asp:TextBox&gt; (Exemplo: +351234925xxx)&lt;/td&gt;&lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt;&lt;b&gt;2º Telefone:&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;asp:TextBox ID="empresa2" runat="server" MaxLength="4"&gt;&lt;/asp:TextBox&gt; (Exemplo: xxxx)&lt;/td&gt;&lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt;&lt;b&gt;Telemóvel:&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;asp:TextBox ID="telemovel" runat="server" MaxLength="13"&gt;&lt;/asp:TextBox&gt; (Exemplo: +3519xxxxxxxx)&lt;/td&gt;&lt;/tr&gt;
      &lt;tr&gt;&lt;td colspan="2"&gt;&lt;asp:Label ID="lblInfo" runat="server" Font-Bold="True"&gt;&lt;/asp:Label&gt;&lt;/td&gt;&lt;/tr&gt;
      &lt;tr&gt;&lt;td&gt;&lt;asp:Button ID="cmdSave" runat="server" Text="Guardar" onclick="cmdSave_Click" /&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>my goal is 
  when page loads verify if the <code>username.Text = "[" + HttpContext.Current.User.Identity.Name + "]";</code> i pretent do verify  if already exist in access database if <strong>YES</strong> show the table with the information to update
  if <strong>NO</strong> show the table to insert the information </p>
  
  <p>how can I do such thing working?</p>
  
  <p>my code behind: </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.Data;
  using System.Data.OleDb;
  using System.Security.Principal;
  
  public partial class _Default : System.Web.UI.Page
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          username.Text = "[" + HttpContext.Current.User.Identity.Name + "]"; 
      }
  
  
      protected void cmdSave_Click(object sender, EventArgs e)
      {
          string sFilePath = Server.MapPath("Database3.accdb");
          OleDbConnection Conn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + sFilePath + ";Persist Security Info=False;");
          string insertCmd = "INSERT INTO colaborador(Empresa,Empresa2,Telemovel,username) VALUES (@Empresa,@Empresa2,@Telemovel,@username)";
          using (Conn)     
          {
              Conn.Open();
              OleDbCommand myCommand = new OleDbCommand(insertCmd, Conn);
              myCommand.Parameters.AddWithValue("@Empresa", empresa.Text);
              myCommand.Parameters.AddWithValue("@Empresa2", empresa2.Text);
              myCommand.Parameters.AddWithValue("@Telemovel", telemovel.Text);
              myCommand.Parameters.AddWithValue("@username", HttpContext.Current.User.Identity.Name);            
              Response.Write(" ");
              myCommand.ExecuteNonQuery(); 
              lblInfo.Text = "Dados guardados!";
              lblInfo.ForeColor = System.Drawing.Color.Green;
          }
      }
  }
  </code></pre>