title: Razor Pages, form page handler not working with GET method
body: <p>I have a small ASP.NET Core Razor Pages project. I'm making a simple list display page with a basic search functionality. In my model, I have 4 page handlers (2 of them are added for debug purposes): </p>
  
  <pre><code>public async Task OnGetAsync()
  {
      Posting = await _context.Postings
          .Include(p =&gt; p.ItemDetails).Include(p =&gt; p.Owner).ToListAsync();
  }
  
  public async Task OnPostAsync()
  {
      Posting = await _context.Postings
          .Include(p =&gt; p.ItemDetails).Include(p =&gt; p.Owner).ToListAsync();
  }
  
  public async Task&lt;PageResult&gt; OnGetSearchAsync(String search)
  {
      if (String.IsNullOrEmpty(search))
      {
          search = search.Trim();
          Posting = await _context.Postings.Where(p =&gt; p.ItemDetails.ItemName.Contains(search)).ToListAsync();
      }
      return Page();
  }
  
  public async Task&lt;PageResult&gt; OnPostSearchAsync(String search)
  {
      if (!String.IsNullOrEmpty(search))
      {
          search = search.Trim();
          Posting = await _context.Postings
              .Where(p =&gt; p.ItemDetails.ItemName.Contains(search)).ToListAsync();
      }
      return Page();
  }
  </code></pre>
  
  <p>When the form specifies <code>method="post"</code> with <code>asp-page-handler="search"</code>, the form calls the correct handler (<code>OnPostSearchAsync(String search)</code>). However, when the form specifies <code>method="get"</code> with <code>asp-page-handler="search"</code>, the form calls the wrong handler (<code>OnGetAsync()</code>). Is this intended? If so how can i call a custom handler while using the <code>GET</code> method? Maybe using a custom handler isn't necessary but i think i should be able to if i choose to.</p>
  
  <p>Here is the relevant code in <code>.cshtml</code> file:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="posting_search_bar_container"&gt;
      &lt;form method="get" asp-page-handler="search"&gt;
          &lt;input type="text" name="search" /&gt;
          &lt;input type="submit" value="Ara" /&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  &lt;div id="posting_list_container"&gt;
      @if (Model.Posting != null)
      {
          @foreach (var posting in Model.Posting)
          {
              &lt;partial name="./Partials/_Posting" model="new Pages.Postings.Partials.PostingModel(posting);" /&gt;
          }
      }
  &lt;/div&gt;
  </code></pre>