Reputation: 11
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.
Upvotes: 1
Views: 169
Reputation: 11
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);
Upvotes: 1
Reputation: 2961
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?
Upvotes: 1