Hi all.
Having a little trouble with a single-page-architecture web-application. I am building the application out of WUCs that contain WUCs etc and have tried to make them as re-usable as possible, so that I have controls such as AddressDetails, UserDetails, etc. Now I am running into trouble maintaining the state of these controls.
Take the AddressDetails WUC for example. This has textboxes for each of the address details (street, city, etc) and also has a property named myAddress, which holds the address that the control is being used to edit so that its (the address) values can be used to load the form fields and compare newly entered values against the old ones etc. The only way that I know of to maintain state for properties is to use the Session collection: 'Me.Session("currentAddressForEditing") = Me.myAddress'. The problem is that this gets tricky when several WUCs are all editing the same address, and impossible when there are more than one of the same AddressDetails WUC on the page, so that they are all grabbing at the 'currentAddressForEditing' in the session collection. The latter of which is causing the greatest problems.
Any help that you have to offer here would be invaluable.
Thank you.
Stephen.
Having a little trouble with a single-page-architecture web-application. I am building the application out of WUCs that contain WUCs etc and have tried to make them as re-usable as possible, so that I have controls such as AddressDetails, UserDetails, etc. Now I am running into trouble maintaining the state of these controls.
Take the AddressDetails WUC for example. This has textboxes for each of the address details (street, city, etc) and also has a property named myAddress, which holds the address that the control is being used to edit so that its (the address) values can be used to load the form fields and compare newly entered values against the old ones etc. The only way that I know of to maintain state for properties is to use the Session collection: 'Me.Session("currentAddressForEditing") = Me.myAddress'. The problem is that this gets tricky when several WUCs are all editing the same address, and impossible when there are more than one of the same AddressDetails WUC on the page, so that they are all grabbing at the 'currentAddressForEditing' in the session collection. The latter of which is causing the greatest problems.
Any help that you have to offer here would be invaluable.
Thank you.
Stephen.