tags:

views:

33

answers:

3

hi , i want to maintain user control state accross two to three pages,

how can i do it?

that two to three pages have same user control(with out session)

flow

i have two pages one for listing page ,whaen clicking on any listing goes to detail page so with these two pages left side i am using search user control.

A: 

how can i do it??????????

+1  A: 

Server.Transfer. You can either stuff values in the HttpContext before transferring or refer to the previous page once transferred.

DancesWithBamboo
A: 

I would put the data that you want available on the different pages into a context cache:

Context.Cache.Add(CacheName,
                    CacheData,
                    null,
                    System.Web.Caching.Cache.NoAbsoluteExpiration,
                    new System.TimeSpan(0, 30, 0),
                    System.Web.Caching.CacheItemPriority.High,
                    null);

I'm usually concatenating the data into a delimited string before I add it to the cache and identify the cache based on a user id and it's purpose.