title: asp.net MVC input attribute of type file with bootstrap style casuing strange result
body: <p>I want to have a file-input attribute with the same style as the upload button as seen in the image below. The upload button is using bootstrap. When I apply bootstrap to button A with "TextBoxFor", I get this weird looking button. When I apply bootstrap to button B with "LabelFor", I get the desired style, only without the functionality of the file-input attribute.</p>
  
  <p>My question is, how do I get a file-input field with a certain bootstrap style applied and maintain its functionality. With the same result(style) as if it was applied to a submit-type attribute. I prefer to use one of the html helpers, because I am trying to understand them.</p>
  
  <p><img src="https://i.stack.imgur.com/6Kiys.png" alt="Button A vs Button B"></p>
  
  <p><strong>A:</strong><br>  </p>
  
  <pre><code>@Html.TextBoxFor(m =&gt; m.File, new { type = "file", @class = "btn btn-default btn-file" })
  </code></pre>
  
  <p><strong>B:</strong><br></p>
  
  <pre><code>@Html.LabelFor(m =&gt; m.File, new { type = "file", @class = "btn btn-default btn-file" })
  </code></pre>
  
  <p><strong>Upload button:</strong><br></p>
  
  <pre><code>&lt;input type="submit" class="btn btn-default" value="Upload" /&gt;
  </code></pre>