title: Add value tag to a html Element
body: <p><a href="https://i.stack.imgur.com/ruwK9.jpg" rel="nofollow noreferrer">Picture In Response to a Answer</a>
  <a href="https://i.stack.imgur.com/eFhdv.jpg" rel="nofollow noreferrer">What The Webpage looks Like</a></p>
  
  <pre><code>&lt;input name="ftitle" class="inputbox ui-autocomplete-input" type="text" autocomplete="off"&gt;
  </code></pre>
  
  <p>I need to add value=  to the above HTML input element
  How do I go about doing this? For the life of me, I can Not Figure it out.</p>
  
  <p>Edit: I need this because I need to fill in a text box that is on a web page that does not contain the value= in it. But if I right click on it and add attribute value= then I can change the text through my program.</p>
  
  <p>I am using C# web browser control so I'm using</p>
  
  <pre><code>HtmlElement NewAttribute = doc.GetElementById("ftitle");
  </code></pre>
  
  <p>So when everything is said and done it will look like this.</p>
  
  <pre><code>&lt;input name="ftitle" class="inputbox ui-autocomplete-input" type="text" 
   autocomplete="off" value=""&gt;
  </code></pre>
  
  <p>Here what I got so far if it helps to see what I am up to. this is all for a different web page but I am doing the same thing but I need to add the class "value"</p>
  
  <pre><code> private void Generate_Click(object sender, EventArgs e)
      {
  
  
  
  
          HtmlDocument doc = wbNewProject.Document;
  
  
  
          HtmlElement wbJobName = doc.GetElementById("Name"); //lblcontact.text
          HtmlElement wbEngineer = doc.GetElementById("engineer-lookup"); //
          HtmlElement wbSalesEng = doc.GetElementById("SalesEngineerUserId");
          HtmlElement wbLocation = doc.GetElementById("Location");
          HtmlElement wbBidDate = doc.GetElementById("BidDate");
          HtmlElement wbPriorApproval = doc.GetElementById("PriorApproval"); //True or False
          HtmlElement wbTakeOff = doc.GetElementById("TakeOffComplete"); //True or False
          HtmlElement wbProject = doc.GetElementById("RoleType"); //Design/Build or Plan/Spec
          HtmlElement element = wbNewProject.Document.GetElementById("ftitle");
  
  
  
  
          try
          {
              wbJobName.SetAttribute("value", lblJobName.Text);
  
              if (lblContact.Text.Contains("Dan"))
                  wbSalesEng.SetAttribute("value", "2");
              if (lblContact.Text.Contains("Kelley"))
                  wbSalesEng.SetAttribute("value", "3");
              if (lblContact.Text.Contains("Erv"))
                  wbSalesEng.SetAttribute("value", "4");
              if (lblContact.Text.Contains("Marc"))
                  wbSalesEng.SetAttribute("value", "5");
              if (lblContact.Text.Contains("Terry"))
                  wbSalesEng.SetAttribute("value", "6");
              if (lblContact.Text.Contains("Chad"))
                  wbSalesEng.SetAttribute("value", "7");
              if (lblContact.Text.Contains("Jacob Lenertz"))
                  wbSalesEng.SetAttribute("value", "10");
              if (lblContact.Text.Contains("Terry"))
                  wbSalesEng.SetAttribute("value", "11");
              if (lblContact.Text.Contains("Nate"))
                  wbSalesEng.SetAttribute("value", "12");
  
              wbLocation.SetAttribute("value", lblLocation.Text);
              wbBidDate.SetAttribute("value", lblBidDate.Text);
  
              if (lblPriorApp.Text.Contains("Yes"))
                  wbPriorApproval.SetAttribute("value", "true");
              if (lblPriorApp.Text.Contains("No"))
                  wbPriorApproval.SetAttribute("value", "false");
              if (lblTakeOff.Text.Contains("Done"))
                  wbTakeOff.SetAttribute("value", "true");
              if (lblTakeOff.Text.Contains("Not Done"))
                  wbTakeOff.SetAttribute("value", "false");
  
              wbEngineer.SetAttribute("value", lblEngineer.Text);
              wbProject.SetAttribute("value", lblProject.Text);
          }
          catch { }
      }
  </code></pre>