You could set the NavigateUrl Property of your LinkButton to a ShadowBox
like:
linkbutton.attributes.Add("onclick","shadowbox.open(
{content:'../myLoginPage.aspx"', player:'iframe', width:500, height:500}
);");
if the session is not available.
You have to do that in the onRowDataBound Event of the gridview
In header section of the Page, you have to initialize the Shadowbox:
$(document).ready(function () {
Shadowbox.init({
language: 'en',
players: ['iframe'],
player: 'iframe',
displayNav: false,
handleOversize: 'drag',
skipSetup: false,
overlayOpacity: 0.5,
height: 10
});
}