chetan shinde

chetan shinde

  • NA
  • 108
  • 46k

HTTPPOST Method is not calling in MVC

Sep 11 2017 2:38 AM
here is my code ......
 
@using (@Html.BeginForm("Bonus", "MyPrize", new { @id = UrlParameter.Optional }, FormMethod.Post))
{
if (ViewData["id"].ToString() == "2")
{
<div id="dvBonusPtHistory">
<div class="container">
<div class="form-group">
<div class="col-sm-3">
@Html.Label("From Date: ")
@*@Html.TextBox("txtFrmDt", "", new { @class = "form-control" })*@
<div class='input-group date' id='datetimepicker'>
@*<input id="txtFromDt" type='text' class="form-control" readonly />*@
@Html.TextBox("txtFromDt", "", new { @class = "form-control", @readonly = "readonly" })
<span class="input-group-addon">
<span class="glyphicon glyphicon-time"></span>
</span>
</div>
</div>
<div class="col-sm-3">
@Html.Label("To Date: ")
@*@Html.TextBox("txtToDt", "", new { @class = "form-control" })*@
<div class='input-group date' id='datetimepicker1'>
@*<input id="txtToDt" type='text' class="form-control" readonly />*@
@Html.TextBox("txtToDt", "", new { @class = "form-control", @readonly = "readonly" })
<span class="input-group-addon">
<span class="glyphicon glyphicon-time"></span>
</span>
</div>
</div>
<div class="col-sm-3">
<input type="submit" id="btnSubmit" name="Submit" value="Bonus" class="btn btn-small btn-primary" /> @* formaction="GetVipTrans" formmethod="post" *@
</div>
}
 
 
[HttpPost]
public ActionResult GetVipTrans(string txtFromDt, string txtToDt, string Submit)
{
if (Submit == "Submit")
{
... code Here  
 
 

Answers (1)