The situation is to open a fancy box on the page load,
Please find the below html, and the code behind I am using but with no success.
protected void Page_Load(object sender, EventArgs e)
{
if (SessionController.CurrentMember != null)
{
if (Request.IsAuthenticated)
{
int memberId = SessionController.CurrentMember.MemberID;
bool checkaccepted = CheckAcceptedTermsandConditions(memberId);
if (!checkaccepted)
{
string script = @"<script>$(document).ready(function() {
$(""#onlineCasinoTandC"").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 600,
'speedOut' : 200,
'overlayShow' : false,
'overlayOpacity': 0.5,
'width' : 800,
'showCloseButton': true,
});
$(""#onlineCasinoTandC"").click();
});</script>";
ClientScript.RegisterStartupScript(this.GetType(), "fancybox", script);
onlineCasinoTandC.HRef = "/Common/EN/TermsandConditions.aspx";
}
}
}
}
Regards Srividhya