Home Contact

X

Coder, not artist.

News

All code on here is free, but as a consequence it's up to you to check it, ha! If you have any questions, please use the contact button!

Twitter












Archives

Post Categories

Image Galleries

Syndication:

MVC


Gotcha Got with AzureReader2 and ImageResizer

After my previous post on getting AzureReader2 up and running with ImageResizer – I ran into a problem – I had a page with a foreach on it, where I had a link to each fullsize image. It was all working fine, except for a couple which just wouldn’t work. <a href="/cloud/blah-1/example... src="/cloud/blah-1/example.... /></a> <a href="/cloud/blah-2/hello%2... src="/cloud/blah-2/Hello%20... ......

Registering…

So, I want potential clients to have to enter the least amount of info possible to get an account, to that end, I really don’t see the benefit of a username and email address, I’d rather just use the email address. Pretty easy, edit the Register.cshtml to remove all traces of a ‘username’ field… Edit the controller so that it now reads: model.UserName = model.Email; if (ModelState.IsValid) { /*...*/ } F5 and … no Hmmm, turns out the ModelState isn’t valid, and that’s down to the fact that I’ve left ......

Ajaxy

Today is the big day, the day I attempt to use Ajax in the app… I’ve never done this (well, tell a lie, I’ve done it in a ‘tutorial’ site, but that was a while ago now), so it’s going to be interesting.. OK, basics first, let’s start with the @Ajax.ActionLink Right, first stab: @Ajax.ActionLink("Click to get latest", "LatestEntry", new AjaxOptions { UpdateTargetId = "ajaxEntrant", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" }) As far as I’m aware, I’m asking to get the ‘LatestEntry’ ......

MVC–Hooking up my randomizer

Structurally, I have 3 projects, the site, the EF database and the randomizer. The randomizer uses entities from the EF database, so all is good on that front. So, first cut, add a method to my Controller called Randomize, which takes in one of the EF entities: public ActionResult Randomize(TableB tableB) { /*...*/ } I’ve even given it an [HttpPost] attribute, now, I’m not anyway sure this is right, time will tell right? Anyhews, simple method: [HttpPost] public ActionResult Randomize(TableB tableB) ......

MVC–Day 2(or 3/4ish, maybe more)

So, my excursion in the web world continues… One of the issues I have coming from silverlight / wpf is that I’m very used to the XAML, MVVM approach to developing, I can knock up a passable interface in XAML in very little time (note, I didn’t say a good interface), but I really don’t know how to do this in CSS.. OK, not totally true, I have a rough guess, I have played with things like Firebug, and modified existing css in the past, but the problem with that, is that I’m just tinkering. With this ......