Archive for May 30th, 2006

30 May 2006

Command Line Tricks

1 Comment Fun & Humorous

Sahil has posted some old tricks of using those old DOS commands. Some of the command tricks are really handy, but my favorite one will always remain the same. Its:

PROMPT $P$_$_  ???$_  O.O$_=(___)=$_   U$_$G

My Favorite DOS Command

30 May 2006

Checking all CheckBoxes in a GridView

11 Comments ASP.NET

Like his most previous posts, Scott Mitchell has written another simple and clean implementation of providing check/uncheck all functionality in GridView.

Checking All CheckBoxes in a GridView

Only thing his implementation was missing in article is placing CheckBox in header of GridView and using it to toggle rows CheckBoxes. I have made small modification in the existing code to provide this feature:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not Page.IsPostBack Then
Dim dirInfo As New DirectoryInfo(Request.PhysicalApplicationPath)

FileList.DataSource = dirInfo.GetFiles()
FileList.DataBind()
End If

'On every page visit we need to build up the CheckBoxIDs array
For Each gvr As GridViewRow In FileList.Rows
'Get a programmatic reference to the CheckBox control
Dim cb As CheckBox = CType(gvr.FindControl("RowLevelCheckBox"), CheckBox)

ClientScript.RegisterArrayDeclaration("CheckBoxIDs", String.Concat("'", cb.ClientID, "'"))
Next

'--modified code
Dim checkAll As New CheckBox()
checkAll.Text = ""
checkAll.ID = "checkAll"
checkAll.Attributes.Add("onclick", "ChangeAllCheckBoxStates(this.checked);")
FileList.HeaderRow.Cells(0).Controls.Add(checkAll)

End Sub

Check/Uncheck All

30 May 2006

Automating Your Builds With NAnt

No Comments .NET Tools, C#

NAnt is powerful scripting tool designed for developers, software process engineers, and build specialists to create an automated, repeatable process for building their developed application. Though its do assist developers to automate those same mundane tasks every evening but still most hesitate to use this tool their software developer process. NAnt provides powerful XML-based scripting and some really cool features, as Jean-Paul Boodhoo explains in his series of post “Automating Your Builds With NAnt”, which can streamline your development effort dramatically.

Automating Your Builds With NAnt – Part 1
Automating Your Builds With NAnt – Part 2
Automating Your Builds With NAnt – Part 3
Automating Your Builds With NAnt – Part 4
Automating Your Builds With NAnt – Part 5
Automating Your Builds With NAnt – Part 6
Automating Your Builds With NAnt – Part 7