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.

  • Can you please provide some chunk of code for understanding your problem? – Dikesh Gandhi Aug 20 '15 at 12:43
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, privacy policy and cookie policy

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