or
function error(e) {
if (e.errors) {
var message = "Errors:\n";
$.each(e.errors, function (key, value) {
if ('errors' in value) {
$.each(value.errors, function () {
message += this + "\n";
});
}
});
alert(message);
}
}
</script>
// To Load the SiteMap into telerik frameworkSiteMapManager.SiteMaps.Register<AnotherXmlSiteMap>("sample", siteMap => siteMap.LoadFrom("~/sample.sitemap"));// Binding in UI@Html.Kendo().Menu().Name("Menu").BindTo("sample")// classes to support itpublic class AnotherXmlSiteMap : XmlSiteMap{ public AnotherXmlSiteMap() : base(new PathResolver(), new AnotherVPP(), DI.Current.Resolve<ICacheProvider>()) { } public override void LoadFrom(string relativeVirtualPath) { base.LoadFrom(relativeVirtualPath); }}public class AnotherVPP : IVirtualPathProvider{ public bool DirectoryExists(string virtualPath) { throw new NotImplementedException(); } public bool FileExists(string virtualPath) { throw new NotImplementedException(); } public string GetDirectory(string virtualPath) { throw new NotImplementedException(); } public string GetFile(string virtualPath) { throw new NotImplementedException(); } public string GetExtension(string virtualPath) { throw new NotImplementedException(); } public string CombinePaths(string basePath, string relativePath) { throw new NotImplementedException(); } //public string ReadAllText(string virtualPath) public string ReadAllText(string sessionKey) { return @"<?xml version=""1.0"" encoding=""utf-8"" ?><siteMap><siteMapNode title=""Home"" controller=""Home"" action=""Overview""><siteMapNode title=""Grid""><siteMapNode controller=""grid"" action=""index"" title=""First Look (Razor)"" area=""razor""/><siteMapNode controller=""grid"" action=""index"" title=""First Look (ASPX)"" area=""aspx""/><siteMapNode controller=""grid"" action=""editing"" title=""Batch editing (Razor)"" area=""razor""/><siteMapNode controller=""grid"" action=""editing"" title=""Batch editing (ASPX)"" area=""aspx""/><siteMapNode controller=""grid"" action=""from-table"" title=""Initialization from table (Razor)"" area=""razor""/><siteMapNode controller=""grid"" action=""from-table"" title=""Initialization from table (ASPX)"" area=""aspx""/></siteMapNode><siteMapNode title=""Menu""><siteMapNode controller=""menu"" action=""index"" title=""First Look (Razor)"" area=""razor""/><siteMapNode controller=""menu"" action=""index"" title=""First Look (ASPX)"" area=""aspx""/><siteMapNode controller=""menu"" action=""events"" title=""Events (Razor)"" area=""razor""/><siteMapNode controller=""menu"" action=""events"" title=""Events (ASPX)"" area=""aspx""/><siteMapNode controller=""menu"" action=""api"" title=""API (Razor)"" area=""razor""/><siteMapNode controller=""menu"" action=""api"" title=""API (ASPX)"" area=""aspx""/><siteMapNode controller=""menu"" action=""images"" title=""Images (Razor)"" area=""razor""/><siteMapNode controller=""menu"" action=""images"" title=""Images (ASPX)"" area=""aspx""/></siteMapNode></siteMapNode></siteMap>"; } public string ToAbsolute(string virtualPath) { throw new NotImplementedException(); } public string AppendTrailingSlash(string virtualPath) { throw new NotImplementedException(); }}
@(Html.Kendo().DateTimePickerFor(model => model.StartTime)
.Format("dd.MM.yyyy HH:mm")
.Name("DateTimePickerStartTime")
.Value(DateTime.Now)
)