Hi,
In my SharePoint Provider Hosted App in MVC 5 Razor, controller index methods are called twice every time. For example, if click on any menu item it redirect to the Index page and the page loads twice. Could anyone please help me out of this?
Here is my menu item in layout page-
<li class="active">@Html.ActionLink("Home", "Index", "Home", new { SPHostUrl = SharePointContext.GetSPHostUrl(HttpContext.Current.Request).AbsoluteUri }, null)</li>Here is my Index Method in Home Controller-
[SharePointContextFilter]
public ActionResult Index(string searchID, int page = 1){ ......................... ..................... .................... return View(productList.OrderBy(p => p.createDate).ToPagedList(page, 10)); }