Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Set session on page load View modes: 
User avatar
Member
Member
kalle-internetbudget - 3/7/2011 5:46:41 AM
   
Set session on page load
How do i set a session on page load from example an article page?

/Kalle

User avatar
Kentico Support
Kentico Support
kentico_radekm - 3/30/2011 7:44:34 AM
   
RE:Set session on page load
Hello.

Could you please clarify more in details what exactly do you want to achieve, and provide some particular example, if possible? I mean what data do you want to save on page_load, and how/when do you want to use them then? Also - are you using Portal engine or ASPX templates development model, please?

In general, I would recommend you to use RequestStockHelper class for this purpose, which allows inserting items into HttpContext.Current.Items. You can find more info about this class in our API reference file, on online resources, as HttpContext.Current.Items is .NET class. You can find example of use e.g. here: http://forums.asp.net/t/1354992.aspx

Best Regards,
Radek Macalik