Posts Tagged as LINQ

To complement my post on recursive joins to create hierarchical structures, here's the opposite code to flatten a hierarchy by performing a recursive select in LINQ and returning a flat IEnumerable<T>. Consider the following hierarchical data:NodeDat...

Filed under: Algorithms C# LINQ

Here's a clean solution to doing recursive hierarchical joins in LINQ and C#. I couldn't find an example that didn't use an intermediate "node" class, so I'd like to introduce my approach which provides extension methods to IEnumerabe<T> for doing re...

Filed under: Algorithms C# LINQ

In this post, I thought I'd look at a complete server-side and client-side solution for validating credit card numbers using the LUHN algorithm for both ASP.NET Web Forms and MVC. The core code uses some nice LINQ that I have previously blogged about...

Filed under: Algorithms ASP.NET C# JavaScript LINQ MVC Security

It's a common requirement to strip tags from HTML documents whether you are trying to extract plain text from HTML, or remove tags users have entered in text input fields or textarea fields on forms. The following HTML utility class demonstrates how...

Filed under: C# HTML LINQ

There is one main limitation with FindControl in ASP.NET: it only looks in the NaminingContainer of the control you are searching within. Here is a better, much improved version of FindControl for ASP.NET written in C# as an extension to the Control...

Filed under: ASP.NET C# LINQ

The MD4 hash algorithm is a member of RSA's family of hashing recipes. However, due to certain security design flaws it is no longer used in modern cryptography. Surprisingly, it still plays a vital part in Microsoft Windows NTLM authentication and i...

Filed under: Algorithms C# Cryptography LINQ Security

Valid XHTML 1.0 Strict