C#C
C#3y ago
Messiah

❔ [RazorPages] Any clues why this Select isn't working?

Index.cshtml.cs
public async Task<IActionResult> OnGet(string qstring)
{
  Console.writeline(qstring)
  return Page();
}

Index.cshtml
@page "{qstring?}"
<form method="get" asp-page="Index">
  <select name="qstring">
    <option value="one">one</option>
    <option value="two">two</option>
  </select>
</form>


In theory it should print out and refresh the page when I select, but in reality it's not working. What's happening?
Was this page helpful?