Partial Caching in User Control based on Session Variable?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Manish Jain

    #1

    Partial Caching in User Control based on Session Variable?

    I am trying to implement Partical Caching in a User Control that gets data
    from DB and populates a combo based on:
    1) GroupKey : An int Property that is known for each call (say Source=10,
    Code=11 etc)
    2) UserID : int, Stored in session

    This combo is user specific so that each user has different combo contents
    for different groupkeys, but these would not change for the user for a
    groupkey.

    I have the groupkey part working:

    [PartialCaching( 300, null, null,"GroupKey" )]
    public abstract class LookupCombo : System.Web.UI.U serControl

    .....

    <uc1:LookupComb o GroupKey="7" id="cmbSource"
    runat="server"> </uc1:LookupCombo >

    But I am not able to use the session variable available as a static class
    member Settings.UserID (int). What I have is caching working on groupkey so
    that all users have the data of the first user.

    I tried exposing property for UserID but that doesn't work.

    Can someone suggest any solution?

    Manish


Working...