I’ve read about jQuery in this great post Five recommendations for starting a startup with ASP.NET and wanted to play with it and see how easy it is to call a WebMethod from sQuery. I Started by reading some of the great Tutorials and downloaded the code from here. I Created a test web project, […]


Continue Reading...

Linq to xml provides an easy query interface for XML files. In the following example I will demonstrate how to use linq to xml to read and write data from/to xml file, using the file for persistency maintaining a list of objects. linq to xml can be used for storing application settings, storing persistent objects […]


Continue Reading...

Serialization is the process of saving an object onto a storage medium (such as a file, or a memory buffer) or transmiting it across a network connection link in binary form. The .NET Framework provides an easy-to-use serialization mechanism by using the [Serializable] attribute. If so why do we need the ISerializable interface? Lets compare to […]


Continue Reading...

LINQ to SQL maps the relational database into an object model, and when the program runs the queries in the object model are translated into SQL. SQL contains Aggregate functions like SUM, AVG, MIN, MAX and more. Lets see how this functionality can be implemented using LINQ Enumerable standard aggregation operators. You can also create […]


Continue Reading...

We use collections all the time. Many times we have to expose them to users of our classes. Lets look at this simple tree node class: class TreeNode { private List<TreeNode> children = new List<TreeNode>(); public IList<TreeNode> Children { get { return children; } } } The children need to be accessed by who ever […]


Continue Reading...

Finding a good and free domain is not an easy task, and might be a real time consuming. To make it much more efficient and fun, why don’t you do it the web 2.0 way? check out ajaxwhois.com. you can select the preferred extensions and just type in the name you want to check without […]


Continue Reading...

We wanted to check whether WPF data binding is thread safe, and made a little test (using .NET 3.5). Lets look at the Worker class, which has one property – Money, and is making money in a multithreaded way  – creating 100 threads and increasing the “Money” property from each one of them: class Worker : […]


Continue Reading...

An Identity column in SQL Server is used to auto number the rows. See this great post on Autonumbering & Identity Columns. When you delete rows from the table, the identity will not reset but you have few options of doing it yourself. The SQL Server Management Studio GUI doesn’t support this option… 1. DBCC […]


Continue Reading...

If you try to use HttpWebRequest for calling secured sites, and you are getting the following exception: “The underlying connection was closed: Could not establish trust relationship with remote server” here is what’s happening and how you can (hopefully) solve it: When browsing to a secured site with your web browser, you get a dialog asking if […]


Continue Reading...

Casting float to int is interesting. Not only it causes the value to get truncated, but it also changes binary representation. When you want to cast float to int you have two options: 1) If you came from c/c++, there are several ways to do cast operations but the natural thing would be to use (int). […]


Continue Reading...