title: Change button label text dynamically in razor pages
body: <p>I am using Razor Pages in my ASP.NET Core web application.</p>
  
  <p>I would like to change the button text from code-behind.  Even if i add <code>runat="server"</code> in Html markup and I can't access the button in <code>*.cshtml.cs</code> file.</p>
  
  <p>Also, I can not use <code>&lt;asp:button&gt;</code> in razor pages. Is there any way to do without using the javascript approach?</p>
  
  <pre><code>&lt;input type="submit" value="Create" class="btn btn-primary"/&gt;
  </code></pre>
  
  <p>MyPage.cshtml.cs</p>
  
  <pre><code>public IActionResult OnGet(Guid id)
  {
  if(id == Guid.Empty) //Make button create
  else // make it update
  }
  </code></pre>