i have controller returns decimal value eg: 1.00 need show as
1,00 in view according culture
$.ajax({ type: 'post', url: '@url.action("validatecouponcode","myaccount")', datatype: 'json', data: '{ "couponcode" :"' + couponcode + '", "lockercost" : "' + lockercost + '" }', contenttype: 'application/json', success: function (data) { $.unblockui(); $("#txtcouponvalue").val(data.couponamount); $("#txtpaymentamount").val(data.paymentamount); }, error: function () { alert("error occurred"); } }); }
you can either use int.tostring("#.0", thread.currentthread.currentuiculture) in server or can use number.prototype.tolocalestring() if want in client side if you're using client's local culture.
Comments
Post a Comment