. . . .

18 Jan 2008 » Activision screws up again... Just checked my email to find this beauty sitting in my Inbox.... its a list of everyone's email that has signed up for Activisions Wii replacement disc for Guitar Hero 3.
Thanks Activision!

24 Apr 2007 » Numeric First Last with Next & Previous Hello everyone (Im the only reader?)
Long time since I last posted as I have not encountered anything that I felt was worth a post so that explains the lengthy duration.

Anyhow as the title suggests:
.Net GridView PagerSettings by default give you 4 options most useful , yet at times you may want something extra; such as a Numeric First/Last with previous and next paging ability. I was tasked with this and couldn't find anything that was not overly complex (required a custom pager etc). I found one blog (link to come if i can find it again) that had some customization taking place during the RowCreated Event. After thinking about it I threw it together.

First Set the GridView PagerSettings to "NumericFirstLast"
this will give you a pager that resembles the following:
1 ... 5 6 7 ... 10, where the "...",s will increment to the n number of documents.

Next wire up an event handler for the OnRowCreated Event. The following code explains the rest:

switch (e.Row.RowType)
case DataControlRowType.Pager:
Table pagerTable = (Table)e.Row.Cells[0].Controls[0];
TableRow row = pagerTable.Rows[0];
if (row.Cells.Count > 1)
LinkButton prev = row.Cells[1].Controls[0] as LinkButton;
if (prev != null && prev.Text == "...")
prev.Text = "<<; prev.CommandArgument = "Prev"; } LinkButton next = row.Cells[row.Cells.Count - 2].Controls[0] as LinkButton; if (next != null &&amp;amp;amp;amp;amp; next.Text == "...") { next.Text = ">>";
next.CommandArgument = "Next";

Basically when the pager row is created, we find the linkbutton on either side that jump pages forwards and backwards (the ...'s ) and reconfigure them to display the appropriate text we want and commandarguments.

Thus giving you a numeric first last and next/previous pager style with minimal work.
The code above resembles the following :
1 << 5 6 7 >> 10

And thats all from me for now. Good, Bad or Ugly ? you be the judge..

12 Jan 2007 » New Project Recently, I have been in the process of transitioning out of the Configuration Managment to a full blown developer position. My newest project is converting a severely outdated ASP web application to ASP.Net 2.0.

What was once done with Visual Basic 6.0 and dll registration, numerous registry entries and a whole slew of other older technologies is now done with at least 1/4 of the code, and all .Net.

We're between releases now at my company so there is no offical schedule currently, so its mainly a discovery phase. I would consider myself intermediate to advanced at html but ASP.Net I am total novice. With that in mind I have been able to compact 5 ASP pages into one aspx page.

GridViews and FormViews are some powerful controls. I really have been impressed with how simple it was to whip out a web application which functions near exact to what the older codebase did, without the messy attachments.

A few problems I encountered:
- Using a CheckBox control against data which is not boolean. It took me a bit to figure out the entrails but some custom handling OnRowDataBound and OnRowUpdateCommand events, and tada.
- DropDownList : I had an issue which was mainly lack of knowledge on my part which was setting the SelectedValue property based on what the current database field is.
You can set the SelectedValue property in the markup " /> and ta da!

And that has been about it. We're also using Microsofts shot at Ajax Controls and the associated Toolkit which looks great!