Skip to content

Instantly share code, notes, and snippets.

@andrewsheley
Created October 1, 2018 22:04
Show Gist options
  • Save andrewsheley/95c2f12081083aebd2a31eb254c1804f to your computer and use it in GitHub Desktop.
Save andrewsheley/95c2f12081083aebd2a31eb254c1804f to your computer and use it in GitHub Desktop.
test code
@using (Html.BeginForm("Reprint", "Home"))
{
<div class="row">
<div class="col-md-2">
<div class="form-group">
<label>Expiration Date</label>
<input id="txtDate" class="form-control" type="date" />
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input class="form-control" type="submit" id="btnReprint" value="REPRINT" />
</div>
</div>
</div>
}
<form asp-action="Reprint" asp-controller="Home">
<label>Expiration Date</label>
<input id="txtDate" class="form-control" type="date" />
<input type="submit" value="REPRINT"/>
</form>
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult Reprint(string txtDate) //[Bind("txtDate")] Models.Orders.ReprintViewModel order)
{
string xdate = Request.Form["txtDate"];
return Ok($"What up buddy???? your date selected is: {xdate}");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment