or
[RegularExpression(@"([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-zA-Z0-9]{1}[a-zA-Z0-9\-]{0,62}[a-zA-Z0-9]{1})|[a-zA-Z])\.)+[a-zA-Z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)", ErrorMessage = "Not a valid email")][DataType(DataType.EmailAddress)] public string Email { get; set; }<input type="text" value="" name="Email" id="Email" data-val-required="Das Feld wird benötigt." data-val-regex-pattern="([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-zA-Z0-9]{1}[a-zA-Z0-9\-]{0,62}[a-zA-Z0-9]{1})|[a-zA-Z])\.)+[a-zA-Z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)" data-val-regex="Not a valid email" data-val="true" class="text-box single-line" data-bind="value:Email"><input type="text" value="" name="Email" id="Email" data-val-required="Das Feld wird benötigt." data-val-regex-pattern="([w!#$%&'*+-/=?^`{|}~]+.)*[w!#$%&'*+-/=?^`{|}~]+@((((([a-zA-Z0-9]{1}[a-zA-Z0-9-]{0,62}[a-zA-Z0-9]{1})|[a-zA-Z]).)+[a-zA-Z]{2,6})|(d{1,3}.){3}d{1,3}(:d{1,5})?)" data-val-regex="Not a valid email" data-val="true" class="text-box single-line" data-bind="value:Email">01.@model IEnumerable<SampleViewModel>02. [...]03.@foreach (var item in Model)04.{05. <div class="form-horizontal">06. <div class="form-group">07. @Html.LabelFor(modelItem => item.Html, new { @class = "control-label col-md-2" })08. <div class="col-md-10">09. @Html.Kendo().EditorFor(modelItem => item.Html).Tools(tools=>tools.ViewHtml()).Encode(false)10. </div>11. </div>12. </div>13.} [...]
<nav class="navbar navbar-default" role="navigation"> <ul class="nav navbar-nav"> <li>@Html.ActionLink(Resources.NavigationLink_Feedback, "Index", "Feedback", routeValues: null, htmlAttributes: new { @class = "feedbackmodallink" })</li> </ul> </nav>@(Html.Kendo().Window() .Name("FeedbackWindow") .Title(Resources.Title_Feedback) .LoadContentFrom("Index", "Feedback") .Actions(action => action.Maximize().Close()) .Modal(true) .Iframe(true) .Visible(false) .AutoFocus(true) .Events(events => events.Refresh("FeedbackWindow_Refresh"))) $(document).ready(function () { var tFeedbackWindow = $("#FeedbackWindow").data("kendoWindow"); $("a.feedbackmodallink").click(function (e) { // Was the middle button clicked? // (allow link to still be opened in new tab with middle click should user choose) if (e.which != 2) { // No e.preventDefault(); // Show feedback modal MyNameSpace.TelerikWindow.OpenWindow(tFeedbackWindow); } }); $(window).resize(function (e) { // Is feedback modal currently visible? if (tFeedbackWindow.options.visible) { // Yes, resize modal to new browser size MyNameSpace.TelerikWindow.ResizeWindow(tFeedbackWindow); } }); }); function FeedbackWindow_Refresh() { // Resize window to content MyNameSpace.TelerikWindow.ResizeWindow(this); }MyNameSpace.TelerikWindow = { OpenWindow: function (tWindow) { /// <summary>Opens a Telerik Window after ensuring the window is refreshed back to its original URL and resized to its contents.</summary> /// <param name="tWindow" type="kendoWindow">The Telerik Window to open.</param> // Does the window have an iframe? if (tWindow.options.iframe) { // Yes // Get iframe document var iframe = tWindow.element.children("iframe")[0]; // Get iframe's original and current urls var originalURL = iframe.src; var currentURL = iframe.contentDocument.location.href; // Do the urls match? if (originalURL !== currentURL) { // No, refresh window back to original url tWindow.refresh(); } else { // Yes, ensure window is sized to contents this.ResizeWindow(tWindow); } } // Open window tWindow.open(); }, ResizeWindow: function (tWindow, minWidth, minHeight) { /// <summary>Resizes a Telerik Window to its contents while keeping window within screen bounds.</summary> /// <param name="tWindow" type="kendoWindow">The Telerik Window to resize.</param> /// <param name="minWidth" type="int">The desired min width of window (defaults to 800px to keep bootstrap small columns from wrapping)</param> /// <param name="minHeight" type="int">The desired min height of window (defaults to 375px to keep intial IE load from being too short)</param> // Ensure minWidth and minHeight are defined minWidth = (typeof minWidth === "undefined" ? 800 : minWidth); minHeight = (typeof minHeight === "undefined" ? 375 : minHeight); var oldWidth = tWindow.options.width; var oldHeight = tWindow.options.height; var newWidth = oldWidth; var newHeight = oldHeight; // Does the window have an iframe? if (tWindow.options.iframe) { // Yes // Get iframe content size (adding 40px height buffer) var $iframeBody = tWindow.element.children("iframe").contents().find("body"); var iframeWidth = $iframeBody.width(); var iframeHeight = $iframeBody.height() + 40; // Initialize set new width and height to iframe dimensions newWidth = (iframeWidth > minWidth ? iframeWidth : minWidth); newHeight = (iframeHeight < minHeight ? minHeight : iframeHeight); } // Ensure window fits within screen bounds (using 50px buffer) var browserWindowWidth = window.innerWidth - 50; var browserWindowHeight = window.innerHeight - 50; newWidth = (newWidth >= browserWindowWidth ? browserWindowWidth : newWidth); newHeight = (newHeight >= browserWindowHeight ? browserWindowHeight : newHeight); // Resize window, if needed if (newWidth !== oldWidth || newHeight !== oldHeight) { tWindow.setOptions({ width: newWidth, height: newHeight }); } // Ensure window is still centered tWindow.center(); }};01.public IEnumerable<LogSchedulerModel> ScdLoad() {02. var logs = _entityProvider.QueryLogs(x => x.Where(l => l.CheckInExpected > DateTime.Now));03. var scdLogs = logs.Select(log => new LogSchedulerModel04. {05. ID = log.ID, 06. CheckInExpected = log.CheckInExpected, 07. StartDate = log.StartDate, 08. CheckInActual = log.CheckInActual, 09. ContactNumber = log.ContactNumber, 10. UserName = log.UserName, 11. Location = log.UserName, 12. Start = log.StartDate, 13. End = log.CheckInExpected, 14. EmergencyContactName = log.EmergencyContactName, 15. EmergencyContactNo = log.EmergencyContactNo16. });17. 18. return scdLogs;19. }@(Html.Kendo().Scheduler<LogSchedulerModel>() .Name("scheduler") .Date(DateTime.Now) .StartTime(DateTime.Now) .Height(600) .Views(views => { views.DayView(); views.WorkWeekView(workWeekView => workWeekView.Selected(true)); views.WeekView(); views.MonthView(); views.AgendaView(); }) .DataSource(source => source .SignalR() .Events(events => events.Push(@<text> function(e) { var notification = $("#notification").data("kendoNotification"); notification.success(e.type); } </text>)) .Transport(tr => tr .Promise("hubStart") .Hub("hub") .Client(c => c .Create("scdcreate") .Read("scdload") .Update("scdupdate") .Destroy("scddestroy") ) .Server(s => s .Create("scdcreate") .Read("scdload") .Update("scdupdate") .Destroy("scddestroy") )) .Schema(schema => schema .Model(model => { model.Id(m => m.ID); model.Field(m => m.ID).Editable(true); }) ) )
)function CategoryFilter(element) { element.kendoDropDownList({ dataSource: { transport: { read: "/Software/GetSoftwareCategoriesForFilter" } }, optionLabel: "--Select Value--" });}bundles.Add(new ScriptBundle("~/bundles/scripts") .Include("~/Scripts/GeneralFunctions.js"));columns.Bound(c => c.Software.SoftwareCategory.Name).Title("Software Category").Width(150).Filterable(filterable => filterable.UI("CategoryFilter"));