0

I want to redirect from application page within a model box to site root web url but for some reason it dont work i am adding this code

ClientScriptManager.RegisterClientScriptBlock(typeof(System.Web.UI.Page), Guid.NewGuid().ToString(), String.Format("window.frameElement.navigateParent('{0}');", siteURL), true);

but it always takes me to page

http://www.hepod.com/sites/portal/subsite/http://www.hepod.com/sites/portal

thanks

0

window.frameElement.navigateParent - works only for popup windows. Is your application page opens in popup? You can easily use window.location.href instead of this. Also it is necessary verify that siteURL has correct value.

4
  • it did not works uncaught TypeError: Property 'href' of object [object Location] is not a function
    – Change
    Nov 20 '13 at 15:00
  • It's because you use it like a function. The correct using is window.location.href = siteURL; Nov 20 '13 at 15:07
  • still doesn't work :(
    – Change
    Nov 20 '13 at 15:43
  • What the value of siteURL variable? Did you try Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), Guid.NewGuid().ToString(), "window.location.href = siteURL;", true); Nov 20 '13 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.