Category Archives: ASP.Net

Dear Umbraco… I Can Haz Content?!

Basic mission; code not my own. Create an advert type; consisting of URL and Image. Additional requirement created setting the type of advert (using uComponents) An AdvertContainer (Doc Type) With two ‘types’ of advert (i.e. 3rdparty/mpu) ThirdParty contains JS (no image/URL) MPU contains Image/URL var nodes = GetMultiNodeSelection(1101, "adverts"); Foists off into some god awful … Read on Squire

Self Referencing Table Joins in FluentNHibernate

A common usage of the self-referencing joins is the use of 1 table for regions and subregions; its also the laziest example that comes to mind. Entity using System.Collections.Generic; using Domain.Base; public class Region : DomainObject<int, Region> { private IList<Region> _subRegion = new List<Region>(); public virtual string Name { get; set; } public virtual IList<Region> … Read on Squire

Using Umbraco Content Service outside of Umbraco context/control in Umbraco 6

In order to make user of IContentService outside of Umbraco Controllers/Views/etc you’re going to need to expose it. Much in the same way you’d setup NHibernate to create a session factory on application start we grab IContentService and make it accessible. In this case via UmbracoApplication.UmbContentService UmbracoApplication.cs namespace XXX.UI { using System.Web.Http; using System.Web.Mvc; using … Read on Squire

Setting up ASP.Net MVC 2 on IIS6 with IISRewrite

This will also work in ASP.net MVC, as in the first one.

It's a somewhat well known fact, (by somewhat I mean for amongst web devs, my mum wouldn't understand any of that), that IIS6 is the IE6 of Servers, its slow, dim-witted, annoying, crap and here to stay.

So to make life a little more bearable and to save the rest of the web-society from a life of .net 2 webform's, bloated view states and ugly urls here's a quick "how to".

Validating UK Credit & Debit Cards With LUHN to Type

Credit Card validation is a Pain in the Arse *Updated April 2010 But its not going anywhere fast. So I’ve combined two of the scripts I’ve found to meet my needs, added UK credit card data (Maestro/VisaDebit etal) and a bit of optimization and here it is. Algorithm Sources: * http://www.codeproject.com/KB/aspnet/UltimateCreditCardUtility.aspx * http://orb-of-knowledge.blogspot.com/2009/08/extremely-fast-luhn-function-for-c.html * Extra … Read on Squire