I am currently in C# and I have set Session variables on each page.
The link to my Colorbox is in the MasterPage, and on click opens up in> an iframe from a different page in a different folder
i.e.
/admin/deals.aspx <– iframed page in colorbox which needs SESSION
/default.aspx <– page with set SESSION
Is there a way I can pass this variable to the iframed page?
Session is relative to the user and site, not the page, so there is no reason why deal.aspx cannot access the Session variable set by default.aspx.
Alternatively, you could just pass the value on the querystring to the iframe. I am not a fan of this though as it means the user can tamper with the variable. Instead what i like to do is generate a random key (guids are good for this), use that as the Session key to store the variable, and then pass the key through on the querystring – still not foolproof, but it obfuscates things (the user cannot tamper with the variable value), and it prevents hardcoding of any keys in to your source code (as different pages need to know the same Session key).