0
I have the following event:
protected void Page_Load(object sender, EventArgs e)
{
this.tituloTela.InnerText = metodos.RetornarNomeMenuTitulo(((System.Web.UI.TemplateControl)(this.Page)).AppRelativeVirtualPath.Remove(0, 2));
metodos.LiberarAcesso(this.Page, this.GetType(), Form_Cad);
if (!this.IsPostBack)
{
var objBonusVenda = new BonusVenda();
if (objBonusVenda.ConsultarBonusVenda() > 0)
{
txtBonMaster.Text = objBonusVenda.BonMaster.ToString(String.Format("{0:0,0}", value1));
txtBonFilhote.Text = objBonusVenda.BonFilhote.ToString(String.Format("{0:0,0}", value2));
}
}
}
That once loading the page bring the data that exist in the class in decimal form, however the field is bringing so:
Only the right I need would be:
Obs.
1 - I’m applying the masks on these Textbox
in jQuery
Code jQuery:
function aplicarMascaras() {
$("#<%=txtBonMaster.ClientID%>").maskMoney({ showSymbol: false, decimal: ",", precision: 2, allowZero: false });
if ($("#<%=txtBonMaster.ClientID%>").val() == "") { $("#<%=txtBonMaster.ClientID%>").val("0,00"); }
$("#<%=txtBonFilhote.ClientID%>").maskMoney({ showSymbol: false, decimal: ",", precision: 2, allowZero: false });
if ($("#<%=txtBonFilhote.ClientID%>").val() == "") { $("#<%=txtBonFilhote.ClientID%>").val("0,00"); }
}
2 - Fields declared in class and table are decimal
3 - The various value1
and value2
are declared at the beginning of the code.
Can help me to format properly?
How is the application/machine culture configured? Are you sure you want to configure this in the server request?
– Maniero
@bigown actually I’m pretty lost in that regard, I don’t know where I can treat it in the best way.
– Igor Carreiro