Hi i want to create table that has as many rows as user can set in input field.
how to do that instead of 5 in for loop i have value specified in input tag ?
@Using (Html.BeginForm("AddNewProces", "Admin", FormMethod.Post))
@<input type="number" value="5" min="1" name="rowsNumber" />
@<table>
@For i As Integer = 0 To 5
@<tr>
<td>Row @i</td>
</tr>
Next i
</table>
End Using
EDIT: Ok i decided to change some things but now it still doesent work ;/ this is what i try now:
<script type="text/javascript">
$('.rowsNumber').on('input', function () {
alert("Value Changed");
});
</script>
and here is my htlm.textboxfor
@Html.TextBoxFor(Function(m) m.NumberOfRows, New With {.class = "rowsNumber"})
"manually written input"for TextBoxFor