title: Show razor page as modal popup
body: <p>I'm trying to render a razor page as the content of a modal dialog:</p>
  
  <p>This is the razor page</p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;div class="title modal " tabindex="-1" id="loginModal"
           data-keyboard="false" data-backdrop="static"&gt;
          &lt;div class="modal-dialog"&gt;
              &lt;div class="modal-content"&gt;
                  &lt;div class="modal-header"&gt;
                      &lt;h4&gt;@IdentityResources.ResendEmailConfirmation&lt;/h4&gt;
                      &lt;button type="button" class="close" data-dismiss="modal"&gt;×&lt;/button&gt;
                  &lt;/div&gt;
                  &lt;div class="modal-body"&gt;
                      &lt;form  method="post"&gt;
                          &lt;div class="form-group"&gt;
                              &lt;input class="form-control" type="text" placeholder="Email" id="inputUserName" /&gt;
                          &lt;/div&gt;
                          &lt;div class="modal-footer"&gt;
                              &lt;button type="submit" class="btn btn-primary col-md-2"&gt;@IdentityResources.Send&lt;/button&gt;
                          &lt;/div&gt;
                      &lt;/form&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          $("#loginModal").modal('show');
      });
  
      $("#btnHideModal").click(function () {
          $("#loginModal").modal('hide');
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>And later in another razor page I create a link to the page:</p>
  
  <pre><code>&lt;a asp-page="/Identity/_ResendConfirmationEmail"&gt;@IdentityResources.ResendEmailConfirmation&lt;/a&gt;
  </code></pre>
  
  <p>Once it's clicked the razor page is displayed, but since it's action link, it's redirecting directly to the page, instead of rendering it over the current page.</p>
  
  <p>How can I change this behavior?</p>