Loading Entirely the ASP Page

How am I be able to load the entire page before issuing an alert window using javascript.

<asp:Content ID="cpBody" ContentPlaceHolderID="cpBody" Runat="Server">
        if(Session["userid"] == null)
            string strAlert = string.Empty;
            strAlert = "<script type='text/javascript'>alert('Unable to access page, please login.');</script>";

I would probably create a new placeholder for the warning text itself. Then move that inline code to your code-behind file in Page_Load event handler. Test userid there and simply set the visibility properties on the two placeholders appropriately.

Okey…would it be okey if I’ll just display the warning and then redirect after 5 seconds?

you can use the ajax timer to redirect after 5 secs