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 »
Posted on July 24, 2008 by Balaji Ramesh
I wanted to give WPF a try and was creating a timer application which will pop up a window once a while. But what I wanted was for the application to keep running in the tray even when its closed. The following code does NOT work in WPF for some reason:
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs [...]
Filed under: .net, C#, Code, Microsoft, WPF | 1 Comment »
Posted on July 16, 2008 by Balaji Ramesh
I was using the StreamReader class to read the contents of a text file. I was under the assumption (well I know its a bad
thing) that because I am only reading the contents of the file, the file would be available for other applications to read or write. Guess what, i was wrong. The StreamReader [...]
Filed under: .net, C#, Code, Microsoft, Technical | 6 Comments »
Posted on June 5, 2008 by Balaji Ramesh
Using Persited Columns in SQL Server 2005 via t-sql and sql server management studio
Filed under: Code, Microsoft, Performance, SQL, SQL Server, T-SQL, Technical | Tagged: Computed Column, Management Studio, Persisted, SQL Server | 3 Comments »
Posted on May 30, 2008 by Balaji Ramesh
W3C has defined a set of illegal characters for use in XML . You can find info about the same here:
XML 1.0 | XML 1.1
Here is a function to remove these characters from a specified XML file:
using System;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
namespace XMLUtils
{
class Standards
{
[...]
Filed under: .net, C#, Code, Microsoft, Standards, Technical, XML | Tagged: Illegal Characters, W3c, XML | 18 Comments »
Posted on May 9, 2008 by Balaji Ramesh
There might be situations when you might want to quickly calculate the MD5 or SHA2 values of any file or a set of files. The solution depends on what is your requirement: 1) Its a one time work and you would just want the results in a text / html file 2) You want the [...]
Filed under: .net, C#, Code, Microsoft, Security, Technical | Leave a Comment »
Posted on December 27, 2007 by Balaji Ramesh
Well, I was working on one of the projects which required the use of the FIFO and LIFO data structures. Since the project was based on .NET, I had no trouble at all implementing the same.
The System.Collections namespace provides us with the classes required to implement FIFO and LIFO.
Declare the queue:
Queue myQ = new Queue(5);
To [...]
Filed under: .net, Code, Microsoft, Technical, Visual Studio | Tagged: FIFO, LIFO, Queue, Stack | 3 Comments »