I am struggling with the following problem. I have in my .Net 4 application with Razor Page a database query that is started with a button (upper part in the code) and now I want to send the value of the radio button group (lower part in the code) with it, is this feasible and if so how? I would like to do this, if somehow possible, only with one button. Maybe this is also possible with a ViewBag variable? How would you do that?
Many thanks in advance.
<form method="post" id="queryForm" asp-controller="HomeController">
<div class="input-group">
<select id="sqlQuerriesDropDown" class="form-select" name="selectedQuery">
@foreach (var SqlQuery in ViewBag.SqlQuerriesDropDown)
{
<option value="@SqlQuery.getQueryName()">@SqlQuery.getQueryName()</option>
}
</select>
<p> </p>
<!-- Schaltfläche Anzeigen -->
<input type="submit" class="btn btn-primary" value="View result"/>
<p> </p>
</div>
<div>
<br />
<label><b>Decimal separator</b></label><br />
<label><input class="boost_radio" onklick="boostNo(1)" asp-for="Boost_No.Number" type="radio" name="mySeperator" value=0 ViewBag.RB="0" checked="checked" /> Comma</label><br />
<label><input class="boost_radio" onklick="boostNo(2)" asp-for="Boost_No.Number" type="radio" name="mySeperator" value=1 ViewBag.RB="1" /> Point</label><br />
<span asp-validation-for="Boost_No.Number"></span><br />
<input type="submit" value="submit" name="myDelimitter" id="submit" />
</div>
</form>