Server Error in '/' Application.

Conversion from string "instant booking 12:00:00 AM" to type 'Date' is not valid.

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.InvalidCastException: Conversion from string "instant booking 12:00:00 AM" to type 'Date' is not valid.

Source Error:


Line 49:             LblArrive.Text = TxtNgaydi.Text
Line 50:             LblDepart.Text = TxtNgayve.Text
Line 51:             LblLights.Text = (CDate(TxtNgayve.Text & " 12:00:00 AM") - CDate(TxtNgaydi.Text & " 12:00:00 AM")).Days
Line 52:             LblAdults.Text = DrlNguoilon.SelectedValue
Line 53:             LblChildren.Text = DrlTreem.SelectedValue

Source File: C:\Inetpub\vhosts\royalholidayhanoihotel.com\httpdocs\bookingonline.aspx.vb    Line: 51

Stack Trace:


[InvalidCastException: Conversion from string "instant booking 12:00:00 AM" to type 'Date' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(String Value) +1577614
   bookingonline.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\royalholidayhanoihotel.com\httpdocs\bookingonline.aspx.vb:51
   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.4700.0