Redirecting to Another Page

There are two basic kinds of redirection to a new page from the server:

  • Response.Redirect() - The standard ASP.NET means of redirection.

  • Generating JavaScript that sets window.location.href .

In case Response.Redirect() does not work for you (for example, if called during partial rendering), you can use the script generation approach through a RadAjaxControl.Redirect() server method exposed by RadAjaxManager and RadAjaxPanel.

This Telerik method registers JavaScript code that uses the window.location.href property to navigate to a new URL, while providing you with the convenience of using a simple server method.

Example 1: Using RadAjaxManager Redirect()


RadAjaxManager1.Redirect("http://www.google.com/");
//or
RadAjaxManager.GetCurrent(Page).Redirect("http://www.google.com/");

RadAjaxManager1.Redirect("http://www.google.com/")
'or
RadAjaxManager.GetCurrent(Page).Redirect("http://www.google.com/")

Example 1: Using RadAjaxPanel Redirect()


RadAjaxPanel1.Redirect("http://www.google.com/");

RadAjaxPanel1.Redirect("http://www.google.com/")

See Also

In this article
Not finding the help you need? Improve this article