Tuesday, July 24, 2012

Quickly Formatting the date in an ASP.NET Gridview

I have recently been dealing with GridViews quite a bit, and one of the things that annoyed me was the way you had to format a date.

You are normally forced to create a function in your code-behind page, and pass the date to it - Which is annoying if you only ever need to format a single date on the page. Something like the following:


<asp:TemplateField HeaderText="Date Header Here">
public object FormatDate(object input)
   string stringObject = input.ToString();
   DateTime dttm = DateTime.Parse(stringObject);
   return dttm.ToString("dd-MMM-yyyy");

This was rather annoying, as it seemed like a very roundabout way to do something seemingly small. After messing around a bit, I found a nice compact way to do it in the GridView itself!

<asp:TemplateField HeaderText="Date Header Here">

Win! \o/

On an unrelated note, getting decently formatted ASP.NET / C# code in blogspot is a nightmare >_>

Friday, July 20, 2012

Kitten Attack!

Since I really need to start posting something here (I always plan to, but it gets delayed), a little something comical to fill the space :D

Tuesday, June 26, 2012

Nikola Tesla - An Eye Opener

A real inspirational eye opener about Nikola Tesla - HIGHLY recommended for pretty much everyone :D

---> \o/ Click Me! \o/ <---

Thanks to The Oatmeal for the comic <3

Google annoyance

Whilst trying to migrate my domain to blogspot, I came across a rather annoying error:

"Another blog or Google Site is already using this address."

After a bit of Googling, I found out that, since I was using my GMail account for my site, it had already set up a Google Apps account for me, and included the Blogspot settings (By default...). So... My site was indeed used - By myself, preventing me from setting up the DNS settings correctly o_O

After deleting the Blogspot site from my Google account, I was able to successfully map everything, resulting in "www.reelix.za.net" now being live! \o/ \o/

Sunday, June 24, 2012


Hi all (Well - Just you really - The one reading this :p), and welcome to my new site!

My previous site, whilst fun to play with, was primarily a location for me to learn PHP, and have a rather vague web presence. It was fraught with hosting issues, DNS issues, coding issues, and layout issues - Many which I have now learned about, and hopefully found my way around :)

For hosting, I have switched to our supreme internet overlords - Google.
They have proved reliable in the past for hosting (And everything else they do, really...), and my previous testing with them went better than expected (Significantly so - They do fantastic SEO... Which, since everyone searches using Google, is probably expected really... :P)

As I have minimal (Read: No) layout skills, I have switched to a template-based layout (Which, knowing me, I'll probably still mess up ;D), which comes with pretty widgety things, which I'll play around with (Expect totaly chaos for now :P)

Oh well - That's about it from me really. Hope you enjoy browsing around, and may the site entertain you when you're feeling bored, educate you when you feel the need for knowledge, and surprise you when you least expect it ;D