473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Help with Custom Class and Session memory

I am building an ASP.Net web application that records
employee incident data over several screens. I have built
custom classes to hold this information as the user enters
data. In order to persist the data, i am trying to use
session memory. The problem is that when i try to cast the
class that is in session memory into a class on my page
and i get NOTHING! Actually, my watch window tells me that
the class equals nothing......

Where am I going wrong?

+++++++
My IncidentDetails Class
Public Class IncidentDetailsClass

Private m_DeptID As Integer
Private m_EmployeeID As Integer
Private m_IncidentID As Integer
Private m_treatmentID As Integer
Private m_IncidentDetailID As Integer
Private m_InjuryTime As Date
Private m_BeganWorkTime As Date
Private m_InjuryType As String
Private m_EmpDescription As String
Private m_BodyPart As String
Private m_bodypartDesc As String
Private m_Equipment As String
Private m_newIncident As Boolean
Private m_WorkRelated As Boolean
Private m_OshaGeneral As String
Private m_OshaAdditional As String
Private m_Privacy As String
Private m_SafetyProvided As Boolean
Private m_SafetyinUse As Boolean
Private m_Witness1 As String
Private m_Witness2 As String
Private m_ActionTaken As String
Private m_ReviewerName As String
Private m_ReviewerDate As Date
Private m_reviewerPhone As String
Private m_OshaFlag As Boolean
Private m_OshaReporter As String
Private m_OshaReportDate As Date
Private m_OshaCaseNumber As Integer


Public Property DeptID() As Integer
Get
Return m_DeptID
End Get

Set(ByVal Value As Integer)
m_DeptID = Value
End Set
End Property

Public Property EmployeeID() As Integer
Get
Return m_EmployeeID
End Get

Set(ByVal Value As Integer)
m_EmployeeID = Value
End Set
End Property

Public Property IncidentID() As Integer
Get
Return m_IncidentID
End Get

Set(ByVal Value As Integer)
m_IncidentID = Value
End Set
End Property

Public Property treatmentID() As Integer
Get
Return m_treatmentID
End Get

Set(ByVal Value As Integer)
m_treatmentID = Value
End Set
End Property

Public Property IncidentDetailID() As Integer
Get
Return m_IncidentDetailID
End Get

Set(ByVal Value As Integer)
m_IncidentDetailID = Value
End Set
End Property

Public Property InjuryTime() As Date
Get
Return m_InjuryTime
End Get

Set(ByVal Value As Date)
m_InjuryTime = Value
End Set
End Property
Public Property BeganWorkTime() As Date
Get
Return m_BeganWorkTime
End Get

Set(ByVal Value As Date)
m_BeganWorkTime = Value
End Set
End Property

Public Property InjuryType() As String
Get
Return m_InjuryType
End Get

Set(ByVal Value As String)
m_InjuryType = Value
End Set
End Property

Public Property EmpDescription() As String
Get
Return m_EmpDescription
End Get

Set(ByVal Value As String)
m_EmpDescription = Value
End Set
End Property

Public Property BodyPart() As String
Get
Return m_BodyPart
End Get

Set(ByVal Value As String)
m_BodyPart = Value
End Set
End Property

Public Property BodypartDesc() As String
Get
Return m_bodypartDesc
End Get

Set(ByVal Value As String)
m_bodypartDesc = Value
End Set
End Property

Public Property Equipment() As String
Get
Return m_Equipment
End Get

Set(ByVal Value As String)
m_Equipment = Value
End Set
End Property

Public Property newIncident() As Boolean
Get
Return m_newIncident
End Get

Set(ByVal Value As Boolean)
m_newIncident = Value
End Set
End Property

Public Property WorkRelated() As Boolean
Get
Return m_WorkRelated
End Get

Set(ByVal Value As Boolean)
m_WorkRelated = Value
End Set
End Property

Public Property OshaGeneral() As String
Get
Return m_OshaGeneral
End Get

Set(ByVal Value As String)
m_OshaGeneral = Value
End Set
End Property

Public Property OshaAdditional() As String
Get
Return m_OshaAdditional
End Get

Set(ByVal Value As String)
m_OshaAdditional = Value
End Set
End Property

Public Property Privacy() As String
Get
Return m_Privacy
End Get

Set(ByVal Value As String)
m_Privacy = Value
End Set
End Property

Public Property SafetyProvided() As Boolean
Get
Return m_SafetyProvided
End Get

Set(ByVal Value As Boolean)
m_SafetyProvided = Value
End Set
End Property

Public Property SafetyinUse() As Boolean
Get
Return m_SafetyinUse
End Get

Set(ByVal Value As Boolean)
m_SafetyinUse = Value
End Set
End Property

Public Property Witness1() As String
Get
Return m_Witness1
End Get

Set(ByVal Value As String)
m_Witness1 = Value
End Set
End Property

Public Property Witness2() As String
Get
Return m_Witness2
End Get

Set(ByVal Value As String)
m_Witness2 = Value
End Set
End Property

Public Property ActionTaken() As String
Get
Return m_ActionTaken
End Get

Set(ByVal Value As String)
m_ActionTaken = Value
End Set
End Property

Public Property ReviewerName() As String
Get
Return m_ReviewerName
End Get

Set(ByVal Value As String)
m_ReviewerName = Value
End Set
End Property

Public Property ReviewerDate() As Date
Get
Return m_ReviewerDate
End Get

Set(ByVal Value As Date)
m_ReviewerDate = Value
End Set
End Property

Public Property reviewerPhone() As String
Get
Return m_reviewerPhone
End Get

Set(ByVal Value As String)
m_reviewerPhone = Value
End Set
End Property

Public Property OshaFlag() As Boolean
Get
Return m_OshaFlag
End Get

Set(ByVal Value As Boolean)
m_OshaFlag = Value
End Set
End Property

Public Property OshaReporter() As String
Get
Return m_OshaReporter
End Get

Set(ByVal Value As String)
m_OshaReporter = Value
End Set
End Property

Public Property OshaReportDate() As Date
Get
Return m_OshaReportDate
End Get

Set(ByVal Value As Date)
m_OshaReportDate = Value
End Set
End Property

Public Property OshaCaseNumber() As String
Get
Return m_OshaCaseNumber
End Get

Set(ByVal Value As String)
m_OshaCaseNumber = Value
End Set
End Property

End Class
+++++++++++++++++++++++
A section of the codebehind where the problem is

Private Sub reportingCriteriaContinue_Click(ByVal sender
As System.Object, ByVal e As System.EventArgs) Handles
reportingCriteriaContinue.Click
If Page.IsValid Then

Dim myReportingCriteria As New
IncidentDetailsClass
myReportingCriteria = CType(Session
("clIncidentDetails"), IncidentDetailsClass)

myReportingCriteria.newIncident =
criteriaNew.SelectedValue
myReportingCriteria.WorkRelated =
criteriaWorkRelated.SelectedValue
myReportingCriteria.OshaGeneral =
ddlOshaGeneral.SelectedValue
myReportingCriteria.OshaAdditional =
ddlOshaAdditional.SelectedValue
Session("clIncidentDetails") =
myReportingCriteria ' save data back into session

If rePost Then
'add page name to session arraylist
Dim newIncident As New ArrayList
newIncident = Session("newIncident")
newIncident.Add("reportingCriteria")
Session("newIncident") = newIncident

Response.Redirect("MedicalTreatment.aspx")
Else
'When a user re-enters data within a
session
'we do not need to enter anything in the
arraylist again.
Response.Redirect("MedicalTreatment.aspx")
End If
End If
End Sub

Nov 22 '05 #1
2 1491
Please ignore this post.

I have solved the problem; It helps when you spell the
varriables correctly............D'oh!

Michael

Nov 22 '05 #2
Please ignore this post.

I have solved the problem; It helps when you spell the
varriables correctly............D'oh!

Michael

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Michael Albanese | last post by:
I am building an ASP.Net web application that records employee incident data over several screens. I have built custom classes to hold this information as the user enters data. In order to persist...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
6
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A...
1
by: Esteban Felipe | last post by:
Hi, thanks for reading. I hope to find some help here before I commit suicide because this is driving me crazy. Please excuse me if this looks like a long post, but I hope that a complete...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
6
by: David Lozzi | last post by:
Howdy, I'm new to classes. Below is my class User. (is this a reserved namespace or class?) It works great, kind of. If I specify the username and password, the correct firstname and lastname...
2
by: Charles | last post by:
I need to find a way to share information between two classes, one is an employee class and the other is a custom error class that inherits from ApplicationException. These two classes are part of...
6
by: Guy Thornton | last post by:
I have an application in asp.net using vb. The asp.net portion of this application is mainly the user interface. The UI has references made to our business logic layer. And the business logic...
0
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted...
7
by: Joey | last post by:
VS2005 asp.net 2.0 C# Developing with File System/Cassini instead of IIS (publish to IIS every so often) Hello guys, I have a web app where I am using static variables on many pages to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.