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 = {}; |
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
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
// 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
// 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
<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
# Stages all uncommited files to local | |
git add -A | |
# Adds a commit message to the local staged files | |
git commit -m "Commit message" | |
# Pushes the locally staged files to the remote repo | |
git push origin | |
# Cleans up local branches from the remote |
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
Get-Hotfix - lists all of the updates (KB######) that have been applied to the server |
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
Regex for field that allows numbers and spaces | |
[0-9 ]+ | |
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
<?xml version="1.0" encoding="utf-8"?> | |
<rewrite> | |
<rules> | |
<rule name="RedirectRule"> | |
<match url="^redirect-url/(.*)" ignoreCase="true" /> | |
<action type="Redirect" url="/test/my-actual-url/" redirectType="Permanent" /> | |
</rule> | |
<rule name="RewriteRule"> | |
<match url="^my-new-url/(.*)$" ignoreCase="true" /> | |
<action type="Rewrite" url="Location/On/Server/{R:1}" /> |
OlderNewer