RadarBob
09-23-2002, 10:19 PM
Before the details of my cookie problem, here's the big picture:
I'm trying to enter multiple sub-records that have a Many:1 relationship to the other data entered on that same web page. I think I need to avoid rebuilding the web page every time the user needs to add another sub-record - I THINK. You tell me if my current solution is unnecessary... and how an alternate solution would look.
My current work-in-progress solution:
Open a child window from the parent page. The sub-record data is kept in a cookie. Using Javascript I can implement the basic "add another sub-record" functionality without having to hit on the server. THE KEY of course is being able to keep the data in cookies. Then, when the main web page is "saved" the cookies data go along to the server as well as the form data.
Now for my cookie problem:
I've hit the 20 cookie limit per server. Each separate field of each record is a separate cookie. Well, I know I could package things so each cookie contained a whole record; I just have to define my own internal delimiters so I can parse each cookie into separate field data ---> doesn't this sound suspiciously like an ASP dictionary object??
"Professional Active Server Pages 2.0 says:
"the cookies collection is implemented in the same way as the dictionary
object."
and further:
".. each member of the cookies collection can hold multiple values ***for that cookie name***" (my emphasis).
We know that cookie names must be unique on the client or else they will overwrite each other. So then, how do I build cookies on the client so they are handled as suggested by the book?
I'm trying to enter multiple sub-records that have a Many:1 relationship to the other data entered on that same web page. I think I need to avoid rebuilding the web page every time the user needs to add another sub-record - I THINK. You tell me if my current solution is unnecessary... and how an alternate solution would look.
My current work-in-progress solution:
Open a child window from the parent page. The sub-record data is kept in a cookie. Using Javascript I can implement the basic "add another sub-record" functionality without having to hit on the server. THE KEY of course is being able to keep the data in cookies. Then, when the main web page is "saved" the cookies data go along to the server as well as the form data.
Now for my cookie problem:
I've hit the 20 cookie limit per server. Each separate field of each record is a separate cookie. Well, I know I could package things so each cookie contained a whole record; I just have to define my own internal delimiters so I can parse each cookie into separate field data ---> doesn't this sound suspiciously like an ASP dictionary object??
"Professional Active Server Pages 2.0 says:
"the cookies collection is implemented in the same way as the dictionary
object."
and further:
".. each member of the cookies collection can hold multiple values ***for that cookie name***" (my emphasis).
We know that cookie names must be unique on the client or else they will overwrite each other. So then, how do I build cookies on the client so they are handled as suggested by the book?