Share data between usercontrols
Posted
by toraan
on Stack Overflow
See other posts from Stack Overflow
or by toraan
Published on 2010-03-26T21:16:08Z
Indexed on
2010/03/26
21:23 UTC
Read the original article
Hit count: 455
ASP.NET
|usercontrols
On my page I have n-userControls (same control) I need to communicate between them(to be more specific I need to pass one in value) .
I don't want to involve the hosting page for that.
The controls acts as "pagers" and interact with the paged data on the hostin page via events that hosting page is subscribed to.
So when user click on one of the pager and changes it's state, the other control should know about it and change itself accordingly.
I can not use VieState because viewstate is per control and so is the controlstate.
Can I use Session for that? (session is shared and there is only one value that i need to store)
Or maybe there is something better I can use? (no QueryString)
© Stack Overflow or respective owner