@(Html.Kendo().ToolBar()
.Name("ToolBar")
.Items(items =>
{
items.Add().Type(CommandType.Button).Id("saveButton").Text("Save").ImageUrl(Url.Content("~/Content/img/save.png")).Click("toolbarSaveClick");
items.Add().Type(CommandType.Button).Id("backButton").Text("Back To List").ImageUrl(Url.Content("~/Content/img/leftarrow.png")).Click("backButtonClick");
})
.Deferred()
)
i have few controls on my page and with out saving the information entered and clicking on above back button in kendo tool bar i get a prompt saying are you sure you want to leave this page or stay on this page.
So when i click on kendo tool bar back button and prompts and if i selects stay on this page
my code breaks for below code and after that it stays in page and nothing happens in that page means it wont allow me to save that information.
function backButtonClick(e) {
document.location.href = $("#RedirectToIndex").val();
}
This problem is not there with html button or kendo button.
Problem is with kendo toolbar and button inside that.
waiting for your response.
Thanks,
Dilshad