Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Requirement : Show the Numbers in Currency format.
e.g: 12,13,4575.54

So in Form view is use "{0:C}"
see below
HTML
@using (Html.BeginForm("PuchaseOrder", "PurchaseOrder", FormMethod.Post, new  { @id = "PO_Form" }))
      {
       @Html.TextBoxFor(model => model.Purchase_Amount_AED,"{0:C}", new { @class = "text-field validate[required]" })
    }


When i am submitting the form, other values are posting but this value is null.

C#
[HttpPost]
        public ActionResult PuchaseOrder(PO_PuchaseOrderModel REC)
        {
            decimal? Rate_USD_TO_AED = REC.Purchase_Amount_AED;
        }


How can I resolve this problem.
Thanks
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900