Showing posts with label Redirect. Show all posts
Showing posts with label Redirect. Show all posts

Thursday, 5 December 2013

SOLVED: Session Lost problem after Response.Redirect when redirect from Iframe

Copy & Paste this to head tag:

<script type="text/javascript" language="javascript">
      
        //for Redirect Iframe
        function Redirect() 
        {
            top.location = "Checkout.aspx";
            return false;
        }

</script>


Copy & Paste this code on .cs file:

ScriptManager.RegisterStartupScript(Page, typeof(System.Web.UI.Page),
                                                    "blur", @"<script type='text/javascript'>Redirect();</script>", false);

Note: bool value set true if you don't use UpdatePanel......

Monday, 5 August 2013

Jump out from Iframe to Parent Page with Response.Redirect Method

Copy and Paste this javascript function to .aspx page:

<script type="text/javascript" language="javascript">

        //for Redirect Iframe
        function Redirect() {

            top.location = "Checkout.aspx";

        }

        </script>

Then Copy and Paste it to .cs page:

ScriptManager.RegisterStartupScript(Page, typeof(System.Web.UI.Page),

                                       "click", @"<script type='text/javascript'>Redirect();</script>", false);