Posted on August 28, 2008 by Balaji Ramesh
I wanted to do a case insensitive xpath lookup in my C# .Net application. There was no direct way that i could find to get the job done, but fortunately the workaround ain’t that difficult. Lets consider the following example:
<xml><books><book id=”1″ name=”Book1″ type=”fiction” /><book id=”2″ name=”Book2″ type=”nonfiction” /><book id=”1″ name=”Book1″ type=”FICTION” /></books>
To request for all [...]
Filed under: C#, Microsoft, Technical, Tips, XML | Leave a Comment »
Posted on August 14, 2008 by Balaji Ramesh
I had a table with two columns: ID and Description. The task was to display the description of all elements whose ID is a power of two. Here’s the query that let me accomplish that:
SELECT ID, Desc FROM tblBits WHERE ID > 0 AND ID & (ID-1) = 0
How does this work?
Every power of two [...]
Filed under: Microsoft, SQL, SQL Server, Technical | Leave a Comment »
Posted on August 14, 2008 by Balaji Ramesh
I was using ASP.NET 2.0 along with Ajax Extensions 1.0. I received this error ‘Sys’ is undefined error message every time I used an Ajax control. I was pulling my hair out on it and decided to give the Control Toolkit’s web.config a glance. The following lines were not available in my web.config, so i [...]
Filed under: .net, Ajax, C#, Code, Microsoft, Technical | 11 Comments »