BlogEngine.NET Xbox Gamercard Widget

by stoive 28. September 2009 20:50

I needed to work on something. Facebook is annoying me at the moment because I’ve found out their FB:Silverlight tag doesn’t actually do anything, the Twitter API I’m working on is all well and good but I need to re-work all the methods because the naming convention was way too organic and needs re-structuring.

So I’ve started to look around. For anything really – and obviously the one thing I do have to play with is this. My blog. So I thought I’d start by adding a widget to my blog to show off my Gamertag.

It was SO easy, really. The widgets site on Codeplex has a number of widgets, and that includes an Xbox Gamercard widget. But I had two problems with it.

  1. I didn’t like the extensive amount of work it was doing to generate a small piece of output.
  2. More importantly, It didn’t fix my boredom during my lunch hour today.

So I read the blog entry by Mads Kristensen http://madskristensen.net/post/Creating-widgets-for-BlogEngineNET-14.aspx  which admittedly is for version 1.4, but it gave me the right idea. I then set myself 5 minutes to create the widget which generated the IFrame tag from http://www.xbox.com/en-us/myxbox/embedgamercard.htm – no worries.

I wont go into detail, the only thing I will say it that I had to implement the LoadWidget method in the widget.ascx – which must be a 1.5 thing because its not in the tutorial for 1.4, but made my life a lot easier (never been a big fan of using Page_Load when you’re creating something from a base class, personal preference).

I see no reason to reiterate what’s already been said in this great blog entry, its self explanatory. But you can download my simple little widget and expand it in the widget folder of your site, job done. Now I need another 5 minute project to create another widget. They’re perfect for breaking up a boring lunch hour at work!

XboxGamercard.zip (1.79 kb)

Tags: ,

BlogEngine.NET

Comments are closed

Xbox

About the author

A .NET developer who enjoys seeing what can happen when he follows the random thoughts he gets about code.

Month List

Page List

    Powered by BlogEngine.NET 1.5.0.7 - Eco Theme by n3o Web Designers