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
/// <summary> | |
/// Determines if GZip is supported | |
/// </summary> | |
/// <returns></returns> | |
public static bool IsGZipSupported() | |
{ | |
string AcceptEncoding = HttpContext.Current.Request.Headers["Accept-Encoding"]; | |
if (!string.IsNullOrEmpty(AcceptEncoding) && | |
(AcceptEncoding.Contains("gzip") || AcceptEncoding.Contains("deflate"))) | |
return true; |
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
<script type="text/javascript"> | |
Telerik.Web.UI.RadAsyncUpload.Modules.Flash.isAvailable = function () { return false; }; | |
Telerik.Web.UI.RadAsyncUpload.Modules.FileApi.isAvailable = function() {return false; }; | |
Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable = function() {return false; }; | |
</script> |
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
namespace SerializableExceptions | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Runtime.Serialization; | |
using System.Security.Permissions; | |
[Serializable] | |
public sealed class DerivedSerializableExceptionWithAdditionalCustomProperty : SerializableExceptionWithCustomProperties | |
{ |
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
System.Web.MimeMapping.GetMimeMapping(string fileName); |
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
[AcceptVerbs(HttpVerbs.Post)] | |
public ActionResult Delete(int id) { | |
//Delete that stuff! | |
} |
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
public static class LINQPadExtensions | |
{ | |
private static readonly Dictionary<Type, string> TypeAliases = new Dictionary<Type, string> { | |
{ typeof(int), "int" }, | |
{ typeof(short), "short" }, | |
{ typeof(byte), "byte" }, | |
{ typeof(byte[]), "byte[]" }, | |
{ typeof(long), "long" }, | |
{ typeof(double), "double" }, | |
{ typeof(decimal), "decimal" }, |