Sunday, June 28, 2009

Costco discount for Alamo car rental

Contract ID 7014844 gives 25% off on all rentals.

Coupon code AF3819JDF to receive a free day:
  • Reserve a compact through full-size before 12/31/09
  • Keep it for 5 days or longer
  • Sat night is a must

Wednesday, June 10, 2009

Windows Vista sp2 cleanup utility

This cleans up unnecessary files after sp2 installation, but it'll also make sp2 permanent, i.e., there's no roll back.

Go to start -> run, type cmd.exe
run the following command

c:\windows\system32\compcln.exe

when prompted, press Y

Friday, June 5, 2009

Asp.Net Gridview notes

Some notes on things I encountered recently. Will put some sample code once I am done with current project and have a stable code

  1. Gridview OnRowBound event is fired when we do gridview.databind(); When we do a postback the data in the gridview is displayed using viewstate if gridview viewstate is enabled, but any formatting done in OnRowBound is lost.
  2. If you have dynamically generated controls in gridview header (dropdownlist, textbox etc), it's better to put the code that generates the controls in gridview RowCreated event, since it'll get fired even when postback.
  3. To sort gridview we need to have a SortExpression bind to a boundField. We then have a method to handle GridViewSortEvent.