W
William Mild
I must be getting brain fried. I can't see the error.
Create a new web form with the following code begind:
Public Class test
Inherits System.Web.UI.Page
Public Class ReportCardData
Public Structure Attend
Dim DaysTardy As Double
Dim DaysAbsent As Double
Dim ExcessiveAbsences As Boolean
End Structure
Public Structure Grade
Dim Value As String
Dim GradeableItemID As String
Dim MarkingPeriod As Integer
End Structure
Friend StudentID As Double
Friend GradeLevel As String
Friend Teacher As String
Friend Student As String
Friend SchoolName As String
Friend Principal As String
Public Grades() As Grade
Public Attendance() As Attend
Friend Comments() As String
Friend SeeAttachedNarrative() As Boolean
Friend Promoted As Boolean
Friend Assigned As Boolean
Friend Year As String
End Class
Private rcData As New ReportCardData
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private
Sub InitializeComponent()
End Sub
'NOTE: The following placeholder declaration is
required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As
System.Object
Private Sub Page_Init(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web
Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
rcData.Attendance(1).DaysAbsent = 0
End Sub
End Class
_______________________________________
The "System.NullReferenceException: Object reference not
set to an instance of an object." error occurs on line
that says rcDate.Attendance(1).DaysAbsent=0.
What do I need to do to get this running?
Thanks,
Bill
Create a new web form with the following code begind:
Public Class test
Inherits System.Web.UI.Page
Public Class ReportCardData
Public Structure Attend
Dim DaysTardy As Double
Dim DaysAbsent As Double
Dim ExcessiveAbsences As Boolean
End Structure
Public Structure Grade
Dim Value As String
Dim GradeableItemID As String
Dim MarkingPeriod As Integer
End Structure
Friend StudentID As Double
Friend GradeLevel As String
Friend Teacher As String
Friend Student As String
Friend SchoolName As String
Friend Principal As String
Public Grades() As Grade
Public Attendance() As Attend
Friend Comments() As String
Friend SeeAttachedNarrative() As Boolean
Friend Promoted As Boolean
Friend Assigned As Boolean
Friend Year As String
End Class
Private rcData As New ReportCardData
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private
Sub InitializeComponent()
End Sub
'NOTE: The following placeholder declaration is
required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As
System.Object
Private Sub Page_Init(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web
Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
rcData.Attendance(1).DaysAbsent = 0
End Sub
End Class
_______________________________________
The "System.NullReferenceException: Object reference not
set to an instance of an object." error occurs on line
that says rcDate.Attendance(1).DaysAbsent=0.
What do I need to do to get this running?
Thanks,
Bill