I have this bit of HTML which should call /nodes/calibratePH?value=afloatnumber:
<div style="float:left; width:50%; margin-bottom:30px;">
<h3>PH calibration</h3>
<form id="CalibrationBar" action="/Nodes/CalibratePH" method="post">
<select id=ids type="text" name="name">
<option value="0" disabled selected>name</option>
@{
foreach (var configuration in Program.CAN_Listener.KnownConfigID)
{
if (configuration.type == Web_App.Models.Sensor_Types.PH)
{
<option value="@configuration.name">@configuration.name</option>
}
}
}
</select>
<input type="number" step="0.01" max="10.0" min="-10.0" placeholder="calibration value" name="value">
<input type="submit" value="calibrate PH">
</form>
The problem is, when I enter for instance: 3.09 or 3,09 (doesn't matter). The method CalibratePH in the controller(MVC, ASP.NET) gets the value: 309. 1.1 gives 11, and so forth. Does anyone have an idea how to solve this? I'm thinking about entering the input as text and evaluate the value upon recieval in the method, but that's not how it should be... right?
EDIT: This guy seems to have sort of the same problem