我正在使用文化来更改我的 Web 应用程序中的语言和方向,当我使用 en-US 时出现问题,它工作正常,但是当我更改为 fa-IR 时,它显示我的字符串和数字错误:
Input string was not in a correct format.
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +10725831
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +145
System.Int32.Parse(String s) +23
PortalCore.Admin.Stat.SetValues() in f:\Projects\10-14-2013 PortalCore\EasyToUsePortal\PortalCore\Admin\Stat.aspx.cs:87
PortalCore.Admin.Stat.Page_Load(Object sender, EventArgs e) in f:\Projects\10-14-2013 PortalCore\EasyToUsePortal\PortalCore\Admin\Stat.aspx.cs:22
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
System.Web.UI.Control.OnLoad(EventArgs e) +92
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
或者
String was not recognized as a valid DateTime.
[FormatException: String was not recognized as a valid DateTime.]
System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style) +3369666
System.DateTime.ParseExact(String s, String format, IFormatProvider provider) +31
PortalCore.Admin.ManageTasks.btnSubmitTask_Click(Object sender, EventArgs e) in f:\Projects\10-14-2013 PortalCore\EasyToUsePortal\PortalCore\Admin\ManageTasks.aspx.cs:28
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9552602
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
我认为我的号码正在更改为本机模式,例如:
0 ==> 。
你能帮帮我吗?我不想改变数字。