Please see: https://github.com/kevinSuttle/html-meta-tags, thanks for the idea @dandv!
Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/
(function ($) { | |
$.fn.serialize = function (options) { | |
return $.param(this.serializeArray(options)); | |
}; | |
$.fn.serializeArray = function (options) { | |
var o = $.extend({ | |
checkboxesAsBools: false | |
}, options || {}); |
========================= | |
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: |
public class CustomerController : Controller | |
{ | |
public ViewResult Index() | |
{ | |
return View(); | |
} | |
public ViewResult Edit() | |
{ | |
var existingCustomer = new Customer(); |
@{ | |
var ajaxOptions = new AjaxOptions { UpdateTargetId = "form" }; | |
var htmlAttributes = new { id = "form", data_ajax_mode = "replacewith" }; | |
} | |
@using (Ajax.BeginForm("Index", null, ajaxOptions, htmlAttributes)) | |
{ | |
} |
using System.Text.RegularExpressions; | |
using FluentValidation; | |
using WpfFluentValidationExample.ViewModels; | |
namespace WpfFluentValidationExample.Lib | |
{ | |
public class UserValidator : AbstractValidator<UserViewModel> | |
{ | |
public UserValidator() | |
{ |
<%@ Page Language="C#" AutoEventWireup="true" %> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title>ASP.NET WebForms Validators & Bootstrap</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" /> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css" /> |
StructureMapOWINMiddleware in remplacement of the IHttpModule : | |
//basic draft | |
public class StructureMapOWINMiddleware : OwinMiddleware | |
{ | |
public StructureMapOWINMiddleware(OwinMiddleware next) | |
: base(next) | |
{ | |
} |