0

I have created a SharePoint Hosted App in Visual Studio 2013 and I am struggling to find a way to navigate to a page.

I currently want a button on the default.aspx page that will navigate to another page inside of the SharePoint Hosted App. I can have a button navigate successfully but it doesn't load the entire query string such as the HostWebUrl, AppWebUrl, ClientTag etc...

I have done a bit of research on this and read about using the Chrome Control but I somehow don't think this is what I need.

Any help would be greatly appreciated.

1
  • Can you please provide some chunk of code for understanding your problem? Aug 20, 2015 at 12:43

1 Answer 1

1

You could get the QueryString parameters using Javascript and append it to your target page URL on the button click event handler.

Please use below code as a starting point:

function onRedirectButtonclick()
{
    var queryString = window.location.href.split('?')[1];
     window.location.href = "/NextPage.aspx?" + queryString;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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