Server Error in '/' Application.

String was not recognized as a valid DateTime.

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: String was not recognized as a valid DateTime.

Source Error:


Line 1181:        Para[0] = new SqlParameter("@MemberID", MEMBER_id);
Line 1182:        Para[1] = new SqlParameter("@Status", ddldirection.SelectedValue);
Line 1183:        Para[2] = new SqlParameter("@PDate", DateTime.ParseExact(ddlPayoutGenerate.SelectedValue, "dd/MM/yyyy", CultureInfo.InvariantCulture));
Line 1184:        ds = db.FetchDataSetProc(Query, Para);
Line 1185:

Source File: i:\ctochealthcare.com\Admin\A0_TeamPromotionalPayoutReport.aspx.cs    Line: 1183

Stack Trace:


[FormatException: String was not recognized as a valid DateTime.]
   System.DateTime.ParseExact(String s, String format, IFormatProvider provider) +5860727
   A0_TeamPromotionalPayoutReport.Button1_Click(Object sender, EventArgs e) in i:\ctochealthcare.com\Admin\A0_TeamPromotionalPayoutReport.aspx.cs:1183
   A0_TeamPromotionalPayoutReport.Page_Load(Object sender, EventArgs e) in i:\ctochealthcare.com\Admin\A0_TeamPromotionalPayoutReport.aspx.cs:78
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4110.0