D
darrel
So, a few weeks ago I asked about an issue I had with our CMS tool where we
were using the following method:
- person logs in, we check credentials against DB
- we store credentials in cookie
- we create a userControl that reads cookie and sets PUBLIC SHARED
variables
- we then load this userControl on each page and reference said variables
whenever we need to check credentials.
This doesn't work due to the SHARED keyword in that the variables are being
reset by every person logging in. This is bad.
The answer seems to be that I should instead use Properties in the user
control.
What I'm confused about is how would one reference said properties from the
page that is loading the usercontrol. I've always been a bit confused by the
'page'/control relationship in terms of sharing data.
were using the following method:
- person logs in, we check credentials against DB
- we store credentials in cookie
- we create a userControl that reads cookie and sets PUBLIC SHARED
variables
- we then load this userControl on each page and reference said variables
whenever we need to check credentials.
This doesn't work due to the SHARED keyword in that the variables are being
reset by every person logging in. This is bad.
The answer seems to be that I should instead use Properties in the user
control.
What I'm confused about is how would one reference said properties from the
page that is loading the usercontrol. I've always been a bit confused by the
'page'/control relationship in terms of sharing data.