ASP.net: CheckboxList Goodness

June 18th, 2009

Run into a problem today that buffle me a bit. Whenver you select an item on the ASP.net Checkbox List control, it will alway return the first item when set the autopostback to true. When the page loads, the values are loaded from what they were before you changed your selection.  Then, the selected event processes which sets the checkbox, then page render happens.  If you want the values, you will have to loop thur the control’s items.

here is the pusedo code on CheckboxList SelectedIndexChanged:

filterOptionList = New List(Of Integer)
Dim i As Integer = 0
While i < Me.cblFilterOption.Items.Count
If Me.cblFilterOption.Items(i).Selected Then
filterOptionList.Add(CInt(Me.cblFilterOption.Items(i).Value))
End If
i += 1
End While

Pre-compile ASP.net site goodness

June 16th, 2009

Run into this error today at work, “BC30456: ‘InitializeCulture’ is not a member of”. After some googling, it turn out, I need to unchecked this option “allow this precompiled site to be updateable” before build in Visual Studio.

Make me wonder what’s the proper way to build an ASP.net website before publish. This link provide a good explination on Pre-compile ASP.net site.

Havn’t keep up with my blogging

May 28th, 2009

Busy at work and am too lazy. I’m going to start blogging about things that I learn on this job which isn’t much since the company blow.

The company isn’t a real software company. They use the software to manage the backend of this franchise. Hell, the company isn’t even a real IT shop as far as i’m concern. No use of source control nor any development method. Everything is fire fighting. Get this done or get that fix now. I fear I will not learn anything from this job and it will suck the joy of programing out of me.

Life is Funny!

October 19th, 2008

About two weeks ago, i got “let go”. I was planning to taking a trip for a month. However, i got several contact from a former manager and i went to a interview setup by one of the contact that my former manager send. I got an offer the next day and it is $10k more than the previous job. Life is funny. When God close a door, he/she open a windows for ya!