asp.net mvc

There are 2 entries for the tag asp.net mvc
Generating and enforcing that any link and request is lowercase with ASP.NET MVC

This post is based off 2 other blog posts I found which helped me come up with my solution with some slight modifications on their code. For my new project I’m having my URLs all lowercase, as some search engines interpret ‘/Home’ and ‘/home’ as two different locations. So the problem became “how can I enforce all my URLs get rendered as lowercase, and how do I force a request to a URL with an uppercase letter to redirect to the lowercase equivalent?”. Because I’m using ASP.NET MVC I needed a way to get the Routing engine to render the URL as...

posted @ Sunday, February 01, 2009 6:02 PM | Feedback (3)

JavaScript variable generation for ASP.NET MVC

RC1 of the ASP.NET MVC framework adds a new ActionResult, JavaScriptResult. This class takes a string and returns a response with the string with the required ContentType. So now theres a built in (very simple) ActionResult for returning JavaScript what about generating the JavaScript string on the server to return? One thing I do alot is to recreate service side enums on the client in JavaScript, so rather than checking values I can use names, which improves the readability of the javascript. However this requires both the server and the client to be kept in sync, which can be a pain. To resolve...

posted @ Saturday, January 31, 2009 2:01 PM | Feedback (0)