Last active
April 8, 2020 03:40
-
-
Save wattanar/2e1a432863e80660c041860be07038de to your computer and use it in GitHub Desktop.
Razor Pages Snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@page | |
@model ExampleModel | |
@{ | |
ViewData["Title"] = "Title"; | |
} | |
<p class="text-success">@TempData["FormResultSuccess"]</p> | |
<p class="text-danger">@TempData["FormResultFailed"]</p> | |
<div class="row"> | |
<div class="col-lg-12 col-md-12 col-sm-12"> | |
<form asp-page-handler="Handler" method="post"> | |
<div class="form-group"> | |
<label asp-for="Example">Example</label> | |
<input type="text" asp-for="Example" class="form-control"> | |
<span asp-validation-for="Example" class="text-danger"></span> | |
</div> | |
<div class="form-group"> | |
<button type="submit" class="btn btn-success"> | |
<i class="fa fa-check"></i> | |
Submit | |
</button> | |
</div> | |
</form> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.RazorPages; | |
namespace Core.Pages | |
{ | |
public class ExampleModel : PageModel | |
{ | |
[TempData] | |
public string FormResultSuccess { get; set; } | |
[TempData] | |
public string FormResultFailed { get; set; } | |
public void OnGet() | |
{ | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="table-responsive"> | |
<table id="gridName" width="100%" class="table table-hover"> | |
<thead> | |
<tr> | |
<th>Username</th> | |
<th>Address</th> | |
<th>Tel</th> | |
<th>Country</th> | |
</tr> | |
</thead> | |
</table> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment