My code below is in a vb file and being imported on one of my aspx files. I am getting this error when trying to load up my aspx page. I am getting the following error. Can anyone help me?
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: Cast from string "" to type 'Date' is not valid.
Source Error:
Line 26: '**********************************************
Line 27:
Line 28: Private _pkId As Integer = 0
Line 29: Private _wod As Date = FormatDateTime(Now(),DateFormat.ShortDate)
Line 30: Private _client As Integer = 0
Source File: c:\inetpub\ Line: 28
Part of code block:
Namespace NewLeafTech
Public Class AccountsReceivable
'**********************************************
' PROPERTY DECLARATIONS AND DEFAULT VALUES
'**********************************************
Private _pkId As Integer = 0 (This is line 28)
Private _wod As Date = FormatDateTime(Now(),DateFormat.ShortDate)
Private _client As Integer = 0
Private _proj As Integer = 0
'**********************************************
' PROPERTY SET/GET BLOCK
'**********************************************
Public Property WeekOfDate() As Date
Get
Return _wod
End Get
Set(ByVal value As Date)
_wod = value
End Set
End Property
End Class
End Namespace regards,
Brian
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: Cast from string "" to type 'Date' is not valid.
Source Error:
Line 26: '**********************************************
Line 27:
Line 28: Private _pkId As Integer = 0
Line 29: Private _wod As Date = FormatDateTime(Now(),DateFormat.ShortDate)
Line 30: Private _client As Integer = 0
Source File: c:\inetpub\ Line: 28
Part of code block:
Namespace NewLeafTech
Public Class AccountsReceivable
'**********************************************
' PROPERTY DECLARATIONS AND DEFAULT VALUES
'**********************************************
Private _pkId As Integer = 0 (This is line 28)
Private _wod As Date = FormatDateTime(Now(),DateFormat.ShortDate)
Private _client As Integer = 0
Private _proj As Integer = 0
'**********************************************
' PROPERTY SET/GET BLOCK
'**********************************************
Public Property WeekOfDate() As Date
Get
Return _wod
End Get
Set(ByVal value As Date)
_wod = value
End Set
End Property
End Class
End Namespace regards,
Brian