open a fancybox on pageload
<p>The situation is to open a fancy box  on the page load,</p>

<p></p>

<p>Please find the below html, and the code behind I am using but with no success.</p>

<pre><code>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 = @"&lt;script&gt;$(document).ready(function() {

                 $(""#onlineCasinoTandC"").fancybox({
                 'transitionIn'  :   'elastic',
                 'transitionOut' :   'elastic',
                  'speedIn'     :   600, 
                    'speedOut'    :   200, 
                    'overlayShow'   :   false,
                     'overlayOpacity':   0.5,
                       'width'         :   800,
                        'showCloseButton':  true,
                         });
                    $(""#onlineCasinoTandC"").click();
                    });&lt;/script&gt;";

                        ClientScript.RegisterStartupScript(this.GetType(), "fancybox", script);
                        onlineCasinoTandC.HRef = "/Common/EN/TermsandConditions.aspx";
                    }

                }
            }

        }
</code></pre>

<p>Regards
Srividhya</p>
