<li>@Html.ActionLink("Home", "Index", "Home", null)</li>
in the Sharepoint MVC app implement, if we use the same code as above. when we click on the hyper link.
we will use this error message.
when we exam the web url.
http://localhost/MySPMVCAppWeb/?Length=4. the SPHostUrl is missing in the url. which is root cause of the above issue.
we simply add SPHostUrl Parameter before the null parameter, will help us solve the above issue and allow user to navigate all pages with the app.
<li>@Html.ActionLink("Home", "Index", "Home", new { SPHostUrl = SharePointContext.GetSPHostUrl(HttpContext.Current.Request).AbsoluteUri }, null)</li>
No comments:
Post a Comment