Server Error in '/' Application.

String reference not set to an instance of a String.
Parameter name: s

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.ArgumentNullException: String reference not set to an instance of a String.
Parameter name: s

Source Error:


Line 21:         string sUnits   = Request.QueryString["units"];
Line 22: 
Line 23:         System.DateTime date1 = System.DateTime.Parse(sDate1);
Line 24:         System.DateTime date2 = System.DateTime.Parse(sDate2);
Line 25:         System.DateTime date3 = System.DateTime.Parse(sDate3);

Source File: c:\inetpub\vhosts\patcoston.com\httpdocs\tools\datemath.aspx.cs    Line: 23

Stack Trace:


[ArgumentNullException: String reference not set to an instance of a String.
Parameter name: s]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) +12836419
   System.DateTime.Parse(String s) +27
   tools_datemath.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\patcoston.com\httpdocs\tools\datemath.aspx.cs:23
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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