call JavaScript - jQuery code from ASP.NET Server-Side

by Arnold Matusz 3 6 2009

jQuery got so close to me lately that I can see myself adding the scripts to my project almost unconsciously. The thing is, jQuery is very useful for me, in almost all situations and it has been a do or die enhancement for all my project since I first put my hands on it.

Of course while using it, you encounter few situations which need a bit of research to solve, mostly when you are trying to combine it with some other technologies like: UpdatePanels and ASP.NET Ajax. For instance there are many situations when I would like to run some jQuery magic based on some decision that I make on the server side. » Continue reading ...

ModalPopupExtender to show a MessageBox

by Arnold Matusz 10 1 2009

Using Ajax in a web application makes a better user experience and if used well, it even improves performance! But it's not all advantages. With the change of a technology, of an approach we need to adjust our way of thinking and the way we apply our solutions for different task.

This might be a bit abstract, so I'll get specific about what I mean. As often met, when you click certain controls on a webpage, you expect to see an outcome, a result or a message as a response to your "request". What Ajax does is ... it replace only certain regions of your webpage. If that region isn't in the visible in the current scroll position of your page in the browser, you won't see the effect. » Continue reading ...

Refresh BlogEngine.net Posts - Clear Cache

by Arnold Matusz 12 12 2008

Lately I’ve come across an interesting situation involving BlogEngine.Net. I normally use Windows Live Writer to write my blog posts, and as I really love to post some programming related articles I use Syntax Highlighter. Sadly I don’t have Windows Live Writer set up (with all the plugins) on each workstation I work on, so whenever I need to change something in a post (typos, updates, etc.) and WLW is not at hand I get down and dirty and edit the XML files which the posts are saved in.

I hear you asking: Why you stupid idiot are you doing that when you can edit your posts in a nice WYGIWYS editor? Well, the only reason is that when I post code samples those need to be in pre tags where each and every space i very important. And after I edit/save a post in BE’s (online) the formatting is lost. » Continue reading ...

Debugging tips and tricks for Visual Studio

by Arnold Matusz 11 12 2008

It is widely known that the in the software development process testing and debugging take much more time than actually writing the lines code. Some pessimistic articles talk about a ratio of up to 80% to 20% (debugging and test vs. code writing).

This is a very strong reason to get down and dirty to get to know the tools we are working with. Because in many cases the debugging activity is very long and without any fixed forecast of it's end exploring hidden features of the Visual Studio debugger can save you allot of time. » Continue reading ...

LINQ to XML and LINQ to XML with XPath performance review

by Arnold Matusz 4 12 2008

In my post about LINQ to XML - XPath I've mentioned how Microsoft warns about the performance bottleneck when using LINQ to XML with the Extension class from the System.Linq.XPath namespace.

"There is some performance penalty for using these methods. Using LINQ to XML queries yields better performance. So it is only advisable to use such LINQ to XML with XPath queries if and only if your application won't suffer from the slight loss of performance!"
» Continue reading ...

LINQ Method cannot be translated into a store expression.

by Arnold Matusz 17 11 2008

LINQ to Entities does not recognize the method 'Int32 ToInt32(System.String)' method, and this method cannot be translated into a store expression.


This is a shortcomming of LINQ to Entities, and indeed the ADO.NET Entity Framework at the current release! The reason for a similar exception message is that in queries on the Entity Framework, custom methods and extensions methods cannot be translated into store expressions.

There are workarounds to still enjoy LINQ to Entities and as an example please read the following: » Continue reading ...

ModalPopupExtender in a GridView sample

by Arnold Matusz 11 11 2008

Although the ModalPopupExtender isn’t new at all there are still countless poeple who search the web for a comprehensive sample on how a ModalPopupExtender is used from a GridView.

First of all you’ld need to have a Button in each row which should trigger the ModalPopupExtender, then you would need to have an instance of a ModalPopupExtender with the TargetControlID set to the ID of that Button. » Continue reading ...

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 ...

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