views:

75

answers:

2

I am using Infragistics control in my application. If the user get deleted from my application then i want to redirect that user to not authorize page. for redirection of the page i am using HttpContext method but it's not working. I tried windows.location as well through java script but it's not working as well. Can somebody help me how to redirect page with AJAX?

Thanks for your help in advance.

+1  A: 

Are you consuming a button click event (or something similar) in your code behind?

If so Response.Redirect(url) will work as per a non-AJAX request?

Robert W
+1  A: 

If you are using Infragistics webAsyncRefreshPanel then you will need to create a literal control and add it to webAsyncRefreshPanel controls collection. Try below code.

           System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append("<script language='javascript'>");
            sb.Append("window.location=notautorizepage.aspx")
             sb.Append("</script>");

            LiteralControl c = new LiteralControl(sb.ToString());
            webAsyncRefreshPanel.Controls.Add(c);
Mahesh