Once stuck on a requirement where I needed to write a code which is flexible and generic enough to sort any type of collection and also the property based on which it has to be sorted will be dynamic. After trying many options I discovered myself how easy it is to hit this requirement using Lamda Expression.
Author Archives: Jebarson
This is a serious necessity in few applications where you want to show the appointments over a calendar. Though most of us are not aware, ASP.net calendar provides an easier way to deal with this. In this tip I am going to show how we can use a ASP.NET Calendar control as Outlook Calendar.
We most the time run into the issue where we need to release a patch which requires a change in one or multiple code behind files and since your site is compiled, you are put into the state that you have to do a deployment instead of releasing those files. But, fortunately you can do that on a… Read More »
ASP.net by default calls the function window.scrollTo(0,0) after the validation failure from ASP.net validators but not always we have the validation summary control placed at the top. There are instances where we need to place validation summary at some other location but by doing this, instead the user being scrolled to see the validation error, he will always see the top of the page.
We all know that defining a nullable type in C# is very simple as below And when you want to check whether the value is null, then there are definitely multiple way you could do. However there is a easy way you could specify the default value i.e., the default value to be used in case the nullable… Read More »
This tips discuss how you can customize the way your RadioButtonList control will look. Below is a simple code which will enable to add me icons for the radio buttons in the list. So, as above we are trying to loop through the radio buttons to which the data is bound. RadioButtonList is nothing but a set of… Read More »
This tips explained how to write a code which is flexible and generic enough to sort any type of collection and also the property based on which it has to be sorted will be dynamic.This is very much easy to hit this requirement using Lamda Expression. Below code will do this for you. We will call this method… Read More »
There are quite a lot of instance where you need to do a primary sort and you need a secondary sort on the same collection and sometimes even multiple sort. With LINQ we can achieve it pretty straight forward. Let us assume the situation here. We have a list of employees and we need the output to be… Read More »