I have a RadWindow created on code behind and when it gets closed I want the server to redirect the user to a specific page which I pass in via a URL parameter as per below:
protected void DisplayResultsWindow(string URL, string labelText)
{
RadWindow resultsWindow = new RadWindow();
resultsWindow.Width = Unit.Pixel(600);
resultsWindow.Height = Unit.Pixel(190);
resultsWindow.NavigateUrl = "Output.aspx?URL=" + URL + "&Label=" + labelText;
resultsWindow.VisibleOnPageLoad = true;
resultsWindow.Modal = true;
resultsWindow.Behaviors = WindowBehaviors.Close;
resultsWindow.Skin = "Glow";
resultsWindow.VisibleStatusbar = false;
resultsWindow.OnClientClose = "Redirect(" + URL + ")";
resultsWindow.Title = "Output";
rwmResultsWindow.Windows.Add(resultsWindow);
}
The JS:
function Redirect(URL) {
window.location = URL;
return false;
}
How to correctly navigate to another page (the page and query string coming code behind) when the client closes the window?
With the above I keep getting error:
JavaScript critical error at line 528, column 502 in http://localhost:19113/Manage?DC=Test\n\nSCRIPT1003: Expected ':'