Posts Tagged ‘MVC

Here a url helper, maybe it can interests you :

public static class UrlHelperExtension
{
public static string Image(this UrlHelper helper, string fileName)
{
return helper.Content(string.Format("~/Content/Images/{0}",fileName));
}

public static string Stylesheet(this UrlHelper helper, string fileName)
{
return helper.Content(string.Format("~/Content/Css/{0}.css",fileName));
}

public static string Javascript(this UrlHelper helper, string fileName)
{
return helper.Content(string.Format("~/Content/Scripts/{0}.js", fileName));
}
}

And here is how I use it :
For CSS :

<link rel="stylesheet" type="text/css" href="<%= Url.Stylesheet("reset") %>" media="all" />

For javascript

<script [...]

So, I work hard these days to  finish my data access. I would like to explain you how I see application’s design.
As I told you before, I want to separate my application in 3 parts. I know that architecture could be discussed but I would make this point clear, it should be “re-factored”. Anyway, for [...]

I know it is a bit weird to begin a CMS application by implementing a Membership system but the simple raison why I start up with that is because I needed for my work (as you can see in my previous post ).
Too often, I saw developers rewriting their own membership system in place to [...]


top