title: Textbox showing the default text
body: <p>I am facing a strange problem. Two of my textboxes in asp.net are showing the default text, but there is no default value is set not even in the .cs file.</p>
  
  <p>Here is the the code for a textbox:</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;
          &lt;asp:TextBox ID="txtName" runat="server" ValidationGroup="reg" Height="32px" Width="155px"
              Style="border: 1px solid #999; background-color: #eee; width: 250px; height: 25px"
              type="text"&gt;&lt;/asp:TextBox&gt;
              &lt;/td&gt;
              &lt;td&gt;
          &lt;asp:RequiredFieldValidator runat="server" ControlToValidate="txtName" Display="Dynamic"
              ValidationGroup="reg" ErrorMessage="Please fill your name as your Id"&gt;&lt;/asp:RequiredFieldValidator&gt;
      &lt;/td&gt;
  &lt;/tr&gt; 
  </code></pre>
  
  <p>Code behind:</p>
  
  <pre><code>    public partial class Registration : System.Web.UI.Page
      {
  
          MySqlConnection con = new MySqlConnection(WebConfigurationManager.ConnectionStrings["conn"].ConnectionString);
          protected void Page_Load(object sender, EventArgs e)
          {
  
          }
  
      protected void btnRegister_Click(object sender, EventArgs e)
      {
          con.Open();
          try
          {
              if (IsUsernameEmailExist())
              {
  
                  Messagebox("Username/Email address already exists. Please try another");
                  return;
              }
              if (txtPassword.Text == txtConfirm.Text)
              {
                  MySqlCommand cmd = new MySqlCommand("insert into MEMBERS (memberNAME,memberEMAIL,memberPASSWORD,memberPHONE,isACTIVE) values(@memberNAME,@memberEMAIL,@memberPASSWORD,@memberPHONE,@isACTIVE)", con);
                  cmd.Parameters.AddWithValue("@memberNAME", txtName.Text);
                  cmd.Parameters.AddWithValue("@memberEMAIL", txtEmail.Text);
                  cmd.Parameters.AddWithValue("@memberPASSWORD", txtPassword.Text);
                  cmd.Parameters.AddWithValue("@memberPHONE", txtPhone.Text);
                  cmd.Parameters.AddWithValue("@isACTIVE", Label1.Text);
                  cmd.ExecuteNonQuery();
                  Sendemail();
                  Clear();
                  Messagebox("User Register Successfully .Now check your mail verification link is sent to your mail. After verification you can access your account");
                  cmd.Dispose();
  
              }
              else
              {
                  Messagebox("Passowrd Not Match");
              }
          }
  
          catch
          {
  
          }
      }
      public void Sendemail()
      {
          string ActivationUrl;
          try
          {
              MailMessage message = new MailMessage();
  
              message.To.Add(txtEmail.Text);
              message.Subject = "Verification Email";
              ActivationUrl = Server.HtmlEncode("http://localhost:55655/WebSite2/Verification.aspx?memberID=" + GetUserID(txtEmail.Text));
              message.Body = "&lt;a href='" + ActivationUrl + "'&gt;Click Here to verify your acount&lt;/a&gt;";
              message.IsBodyHtml = true;
              SmtpClient smtp = new SmtpClient();
              smtp.Host = "smtp.gmail.com";
              smtp.Port = 587;
              smtp.Credentials = new 
              smtp.EnableSsl = true;
              smtp.Send(message);
          }
          catch
          {
          }
      }
      private string GetUserID(string Email)
      {
          MySqlCommand cmd = new MySqlCommand("SELECT memberID FROM MEMBERS WHERE memberEMAIL=@memberEMAIL", con);
          cmd.Parameters.AddWithValue("@memberEMAIL", txtEmail.Text);
          string memberID = cmd.ExecuteScalar().ToString();
          return memberID;
      }
  
      private bool IsUsernameEmailExist()
      {
          MySqlCommand cmd = new MySqlCommand("Select * from MEMBERS where memberNAME='" + txtName.Text + "' or memberEMAIL='" + txtEmail.Text + "'", con);
          cmd.ExecuteNonQuery();
          DataTable dt = new DataTable();
          MySqlDataAdapter adp = new MySqlDataAdapter(cmd);
          adp.Fill(dt);
          if (dt.Rows.Count &gt; 0)
          {
              return true;
          }
          else
          {
              return false;
          }
      }
      private void Messagebox(string Message)
      {
          Label lblMessageBox = new Label();
  
          lblMessageBox.Text =
              "&lt;script language='javascript'&gt;" + Environment.NewLine +
              "window.alert('" + Message + "')&lt;/script&gt;";
  
          Page.Controls.Add(lblMessageBox);
  
      }
      public void Clear()
      {
          txtName.Text = "";
          txtEmail.Text = "";
          txtPassword.Text = "";
          txtConfirm.Text = "";
          txtPhone.Text = "";
      }
  }
  </code></pre>