This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<packageSources> | |
<add key="Local References" value=".\References\" /> | |
<add key="nuget.org" value="https://www.nuget.org/api/v2/" /> | |
<add key="Microsoft" value="https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/" /> | |
<add key="EPiServer" value="http://nuget.episerver.com/feed/packages.svc/" /> | |
</packageSources> | |
</configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Ensure that that ViewModel class inherits IValidatableObject, otherwise | |
// nought is gonna happen. | |
public class ViewModel : IValidatableObject | |
{ | |
public DateTime StartDate { get; set; } | |
public DateTime EndDate { get; set; } | |
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This class allows for HTML to be used in ValidationResult error messages within | |
// the ViewModel. You call it using CustomValidationMessageFor(m => m.Property) | |
public static class ValidationMessageExtensions | |
{ | |
public static IHtmlString CustomValidationMessageFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> ex) | |
{ | |
var htmlAttributes = new RouteValueDictionary(); | |
string validationMessage = null; | |
var expression = ExpressionHelper.GetExpressionText(ex); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Base64 = { | |
// private property | |
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
// public method for encoding | |
encode : function (input) { | |
var output = ""; | |
var chr1, chr2, chr3, enc1, enc2, enc3, enc4; | |
var i = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Web; | |
using System.Web.SessionState; | |
using System.Collections; | |
using System.Threading; | |
using System.Web.Configuration; | |
using System.Configuration; | |
namespace SampleProject.Mvc.Utilities | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var initialLoad = 0; | |
var AjaxRequestsCompleted = (function() { | |
var numRequestToComplete, | |
requestsCompleted, | |
callBacks; | |
return function(options) { | |
if (!options) options = {}; |
NewerOlder