I have the following code. In the model is a property called IsAuthenticated. After the ajax refresh, I need to check this property, and if true, then close the Window. What is the best way to do this?
@using (Ajax.BeginForm("Login", "Account", new AjaxOptions { InsertionMode = InsertionMode.Replace, UpdateTargetId = "loginSection", })) { @Html.Partial("_LoginInfoPartial", Model) <input} type="submit" value="Log in" /> <button type="button" id="close_button" onclick="cancelLogin()" >Cancel</button> <script> function cancelLogin() { var window = $("#loginWindow").data("kendoWindow"); window.close(); } </script> }