Tip Bank

DevX - Software Development Resource

Detect Recursive Calls in Your .NET Code

Here’s a way you can check whether the current method is recursive. The following method returns True when your application is in a recursive method: Public Function CheckRecursion() As Boolean

DevX - Software Development Resource

Add an Image Command Field to a GridView at Runtime in ASP.NET

It’s relatively easy to add an Image Command Field to a GridView programmatically. Here’s how: // in C#if (!Page.IsPostBack){ CommandField field = new CommandField(); field.ButtonType = ButtonType.Image; field.SelectImageUrl = “~/Images/MyPic.GIF”;

DevX - Software Development Resource

The Best Way to Hide a Column in a DataGrid

Typically, developers hide a DataGrid column by getting the index of the column to be hidden, and then hiding it in the ItemCreated event as follows: e.Item.Cells[myColumnIndex].Visible = false; That

DevX - Software Development Resource

Use Array Predicates to Simplify Searches

Array predicates are a not-so-well-known feature introduced with the .NET Framework 2.0 that let you retrieve specific items or perform operations on all items of an array. For example, a