ASP.net MVC support for URL’s with hyphens

C# version of John’s Post for anyone who would prefer it: C# and VB version on my blog public class HyphenatedRouteHandler : MvcRouteHandler{ protected override IHttpHandler GetHttpHandler(RequestContext requestContext) { requestContext.RouteData.Values[“controller”] = requestContext.RouteData.Values[“controller”].ToString().Replace(“-“, “_”); requestContext.RouteData.Values[“action”] = requestContext.RouteData.Values[“action”].ToString().Replace(“-“, “_”); return base.GetHttpHandler(requestContext); } } …and the new route: routes.Add( new Route(“{controller}/{action}/{id}”, new RouteValueDictionary( new { controller = “Default”, … Read more

HTML5 i tag validity with icons

Don’t use i. The i element has a meaning which isn’t appropriate for general icons: […] a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another … Read more

Is it possible to use the same meta tag for opengraph and schema.org

HTML+RDFa 1.1 and Microdata extend HTML5’s meta element. HTML+RDFa 1.1 (W3C Recommendation) defines: If the RDFa @property attribute is present on the meta element, neither the @name, @http-equiv, nor @charset attributes are required and the @content attribute MUST be specified. Microdata (W3C Note) defines: If a meta element has an itemprop attribute, the name, http-equiv, … Read more

Google SEO and hidden elements

hide your menu with javascript on pageload. this way google will still analyse your text. it ignores display:none elements, as well as elements which textcolor is the same as background color, thus making it invisible to the human eye sources: i read it in a book a long time ago. there are sites on the … Read more