LINQ to XML - XPath

by Arnold Matusz 9 11 2008

LINQ to SQL may be dying these days, and to be frank that’s not a big deal as the Entity Framework is out which will 100% replace it. But LINQ as a concept is something new and won’t be out for some time!

While doing some configuration work I got into a sitation where I needed to query an XML file. Immediately my thoughts went to LINQ, and in term LINQ to XML. It is a great addition to the LINQ family but in terms of readability it’s far cry away from the old days when XPath was in use. » Continue reading ...

LINQ: OrderBy on multiple Fields

by Arnold Matusz 2 11 2008

Most people think that by calling OrderBy().OrderBy() will solves the problem of ordering a sequence by multiple fields. Well I'm dissapointed to announce this is not true because the second call overwrites the ordering clause specified in the first one!

First of all lets analyze the architecture of a LINQ ObjectQuery. The important peice is what it actually returns, namely: an IQueriable object! This IQueriable interface implements the IEnumarble interface which we are normally used to use when creating an ObjectQuery. » Continue reading ...

Styling a TreeNode with CssClass

by Arnold Matusz 9 10 2008

Web development with Asp.net is very fast. We have drag and drop controls with out of the box functionality. This concept of prebuild controls is of huge advantage when it comes to rapid application development, saving us allot of time ... but there is one major drawback. We are normally limited to what the controls offer in: rendering, functionality, etc.

Microsoft controls normally render table based designs, which are very difficult to style. If you want to override this you can achieve it using CssFriendlyControlAdapters. It's the same case for the TreeView Control but the table based rendering is probably not the thing that bothers me the most! » Continue reading ...

ASP.net global exception handling and custom error page

by Arnold Matusz 1 10 2008

This is for all those who have allready seen the yellow screen of death. If you are an ASP.net web developer this might have happened to you a few times. It is very helpful as it displays most of the information you need regarding the exception source but in a few cases this might not be enough.

For example, if an exception is thrown within an UpdatePanel the yellow screen of death won't display, instead you'll get a JavaScript alert("") from Sys.WebForms.PageRequestManagerServerErrorException which displays the Exception.Message. (In this case you don't know which object generated the exception and find yourself in a situation where you miss the yellow screen of death). Global exception handling comes in good here, it is a good place to save exception details in a database table or to show it to the developer in a nicely formatted manner. » Continue reading ...

About Arnold Matusz

Arnold Matusz

My name is Arnold Matusz. I'm a web developer specialized in .NET technologies with a passion for photography and cars.

View Arnold Matusz's profile on LinkedIn

Who's amung us