Server Error in '/HINDITEST' Application. Format specifier was invalid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.FormatException: Format specifier was invalid. Source Error: Line 59: txtLangName.Text = ddlLanguage.SelectedItem.Text; Line 60: txtLongDate.Text = DateTime.Now.ToLongDateString(); Line 61: txtCurrency.Text = dblCurrency.ToString("s"); Line 62: txtAmount.Text = dblAmount.ToString("c"); Line 63: } Source File: e:\HINDITEST\Default.aspx.cs Line: 61 Stack Trace: [FormatException: Format specifier was invalid.] System.Number.FormatDouble(Double value, String format, NumberFormatInfo info) +0 System.Double.ToString(String format) +26 _Default.ApplyLocalization() in e:\HINDITEST\Default.aspx.cs:61 _Default.ddlLanguage_SelectedIndexChanged(Object sender, EventArgs e) in e:\HINDITEST\Default.aspx.cs:48 System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e) +105 System.Web.UI.WebControls.DropDownList.RaisePostDataChangedEvent() +134 System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent() +7 System.Web.UI.Page.RaiseChangedEvents() +117 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1646
Vivek Kharb wrote:txtCurrency.Text = dblCurrency.ToString("s");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)