D
Diane Yocom
I'm still very new to ASP.Net, so wanted to get some advice on how to solve
the following design problem (sorry my explanation is so long):
I'm developing an ASP.Net intranet app (using VB.Net for my business
objects) that will allow my users (max of about 25) to enter information
about families and their children. On one page, I need to collect general
information about the family (such as address and phone number) and specific
information (such as name, birthdate, and much more) about one or many
children. Once ALL information is entered about the family and all
children, I'll save it all to the database (into a Family and Child table,
with Family ID being a foreign key in the Child table)
In order to allow for an unlimited number of children, I had planned to
collect the family information on the main page and display a list of any
existing children. The user could choose to edit information about one of
those existing children, or choose to add a new child. In order to add or
edit a child, I'd display a popup window with all the needed child
information.
I've done this many times in the past (using ASP Classic), but in those
cases, I always had the parent record already saved in the database before I
tried to add any children to it (e.g., the Family record was in the database
before any Children were added), so I could just have the Child popup window
save itself to the database as long as I knew the Family ID.
In this project, however, I want to save it all at once, so I need to
persist any data entered in the Children pages, along with everything
entered in the Family page. I was thinking the best thing to do would be to
just store my Family business object (with its collection of Child objects)
in the Session object, then I can update the appropriate Child object each
time the Child popup window is opened and save the entire object to the
database once the user is done.
I know in ASP Classic, however, it was not a good idea to store VB objects
in the Session. Is this true for VB.Net objects? Are there any pitfalls to
this approach that I should be aware of? Are there better design
alternatives for me to pursue?
Thanks in advance,
Diane
the following design problem (sorry my explanation is so long):
I'm developing an ASP.Net intranet app (using VB.Net for my business
objects) that will allow my users (max of about 25) to enter information
about families and their children. On one page, I need to collect general
information about the family (such as address and phone number) and specific
information (such as name, birthdate, and much more) about one or many
children. Once ALL information is entered about the family and all
children, I'll save it all to the database (into a Family and Child table,
with Family ID being a foreign key in the Child table)
In order to allow for an unlimited number of children, I had planned to
collect the family information on the main page and display a list of any
existing children. The user could choose to edit information about one of
those existing children, or choose to add a new child. In order to add or
edit a child, I'd display a popup window with all the needed child
information.
I've done this many times in the past (using ASP Classic), but in those
cases, I always had the parent record already saved in the database before I
tried to add any children to it (e.g., the Family record was in the database
before any Children were added), so I could just have the Child popup window
save itself to the database as long as I knew the Family ID.
In this project, however, I want to save it all at once, so I need to
persist any data entered in the Children pages, along with everything
entered in the Family page. I was thinking the best thing to do would be to
just store my Family business object (with its collection of Child objects)
in the Session object, then I can update the appropriate Child object each
time the Child popup window is opened and save the entire object to the
database once the user is done.
I know in ASP Classic, however, it was not a good idea to store VB objects
in the Session. Is this true for VB.Net objects? Are there any pitfalls to
this approach that I should be aware of? Are there better design
alternatives for me to pursue?
Thanks in advance,
Diane