I have been doing winform applications for a long time now and need to now create a web application. I am going to use CSLA object but need to get some advice on how to pass objects between pages. A code example would be greate.
Thanks,
David
David
The best way is to store the object in session state between the pages.
Solution 1:
Page1:
Session("object") = YourObject
Page 2:
Dim obj As YourObjectType = DirectCast(Session("object"), YourObjectType)
This is the most performant solution, although it doesn't scale as good as solution 2l.
Solution 2:
If you are reluctant to use session state, one alternative is to store the object in the database on page 1, and send the id of the object, via the querystring, to page 2 and reload it there. This is the most scalable solution but doesn't perform so well.
Hope this helps
/Henrik
That helps a lot and makes since. Thanks for the example. I will give it a try later today.
Thanks,
David
Copyright (c) Marimer LLC