Skip to content

Instantly share code, notes, and snippets.

View rabbal's full-sized avatar
🎯
Focusing

Salar Rabbal rabbal

🎯
Focusing
View GitHub Profile
@friism
friism / CookieTempDataProvider.cs
Created April 4, 2012 00:35
CookieTempDataProvider for ASP.NET
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Web;
using System.Web.Mvc;
namespace AppHarbor.Web.Mvc
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 1, 2025 21:56 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@mgroves
mgroves / CustomerController.cs
Created February 15, 2012 03:38
Audit ActionFilter in ASP.NET MVC
public class CustomerController : Controller
{
public ViewResult Index()
{
return View();
}
public ViewResult Edit()
{
var existingCustomer = new Customer();
@chaoaretasty
chaoaretasty / Readme
Created January 24, 2012 18:07
Timespan model binding for MVC3
=========================
Based on the Simple Time Picker Modelbinder by Sergi Papseit Valls
http://www.sharpedgesoftware.com/Blog/2011/06/08/simple-time-picker-model-binder-for-aspnet-mvc-3-and-how-to-save-it-to-sql-ce-4-using-ef-41
=========================
I tried the modelbinder above but found a few issues with it including not being able to deal with blank options or partially filled out TimeSpans. This is my current version of it (it is a bit messy I warn you).
This is designed to bind to nullable TimeSpans, I haven't tried it with non-nullable ones, but you can overcome this by adding a [Required] attribute. The features are:
@TaoK
TaoK / JQuerySerializeCheckbox.js
Created January 6, 2012 21:38
JQuery Serialize Method with Checkbox False Output
(function ($) {
$.fn.serialize = function (options) {
return $.param(this.serializeArray(options));
};
$.fn.serializeArray = function (options) {
var o = $.extend({
checkboxesAsBools: false
}, options || {});