Scenario:
From SharePoint site ribbon icon click opens a dialog window and loads View1.
On View1 a button click navigates to View2.
On View2 a button click should navigate back to View1.
Problem: The Forward navigation is working fine with the href below
window.location.href = '@Url.Action("Index", "Tab")';
But the backward navigation is not working. I have two different Controllers [HomeController, TabController]
<
div
class
=
"k-closeDiv"
>
@(Html.Kendo().Button()
.Name("closeButton")
.Content("Close")
.HtmlAttributes(new { type = "button" })
.Events(e => e.Click("onCloseButtonClick"))
)
</
div
>
function onCloseButtonClick() {
window.location.href = '@Url.Action("Index", "Home")'; //NotWorking..??
}
I have tried all the available options below.
- Here
- RedirectToAction("Action","Controller")
- RedirectToRoute("routeName")
No errors but No option is working.
Is this an issue since I am loading views in dialog window.??
Please suggest. Thanks