This is a question for the user mailing list.
Cheers, Henry Conceição On Mon, May 18, 2009 at 9:12 AM, Kcube <[email protected]> wrote: > > I have tried with Override the Initialize()-method in controller, but > it endedup in an exception > > " > Override the Initialize()-method in your controller, there you should > have access to the http-context and the session, I think. " > > > > protected override void Initialize() > { > UserProfile user = (UserProfile)this.Context.Session > ["GBL_CURRENT_USER"]; > IUserProfile objUserProfile = (UserProfile) > this.Context.Session["GBL_CURRENT_USER"]; > > PropertyBag["usernameforemsa"] = "test User"; > base.Initialize(); > } > > can any one help me ? > > Thanks in Advance > Kcube > > On May 18, 2:43 pm, Kcube <[email protected]> wrote: >> How get session variable inside layout. >> >> 1) I want to show the logged-in user name in layout page. I have tried >> to access the session variable inside the controller and set the >> value to property bag and then access it in layout page $username. >> >> 2) I have inherited the controller from a base page and in the base >> page constructor i tried to access session, but i am not able to >> access the session inside the constructor. >> >> 3) I am able to access the session inside filter, but property bag is >> not available inside filter. >> >> I am sure this is not proper mechanism to access the session variable >> in side layout. Can anyone help me please? >> >> Sorry for asking basic question. Thanks in advance > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Development List" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en -~----------~----~----~----~------~----~------~--~---
