System.Globalization Namespace()

Discussion in 'General troubleshooting' started by RRed, Aug 19, 2009.

  1. Hi,

    I have a issue with parsing a decimal in Asp.net.

    /*
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Globalization;

    public partial class Default2 : System.Web.UI.Page
    {
    protected void Page_Load(object sender, EventArgs e)
    {
    decimal sum = 0;
    string amount = "1,11";

    for (int i = 0; i < 4; i++)
    {
    sum += decimal.Parse(amount, NumberStyles.Any);
    }

    string count2Str = string.Format("{0}", sum);

    Response.Write(sum);
    }
    }
    */

    Running the code on localhost results in : 4,44 :)
    Running the code on Discountasp.net (server) results in : 444 :confused:

    Something wrong in my code? |
    Is the issue generally know? &&
    Is there a workAround for this issue?


    Thanks in advance
     

Share This Page