'number' is not a valid type for an input tag - On my local machine only

This makes no sense.. but as inspired by this answer: https://stackoverflow.com/a/27561096/390501

I updated my Target Framework in Visual Studio to 4.5.1 rather than 4.5 and now the page loads without a parser error!


Use this code to use HTML5 input type:

Use this in .aspx file:

<input type="text" placeholder='0.00' ID="txtNum" runat="server" class="txt/>

Use this in .cs file:

 txtNum.Attributes["type"] = "number";
 txtNum.Attributes["value"] = "0.00";
 txtNum.Attributes["min"] = "0";
 txtNum.Attributes["step"] = "0.01";