Today, I was required to order a list of records based on a Name and then ID. A simple one, but I did spend some time on how to do it with Lambda Expression in C#. C# provides the OrderBy, OrderByDescending, ThenBy, ThenByDescending. You can use them in your...
some I was in search of good asynchronous file upload control which can
upload file without post back and I have don’t have to write much
custom logic about this. So after searching it on internet I have found
lots of options but...
In one of the my earlier post
I have written How easily we do URL rewriting in ASP.NET Web forms. In
this post I am going to explain redirection in URL Routing.
In web application it’s a common scenario that we are redirecting our
page to the one...
Introduction Today, we are going to take a look at the
Windows Simulator which ships with Visual Studio 11 and is used to debug
Metro Style apps for Windows 8. I think it is important to learn about
the features available in the simulator where we...
I've received some questions recently regarding ELMAH.MVC nuget package. Here is the summary blog post and I hope it is helpful.
How to change that to log it into a database?Indeed, the demo project on a github uses simple Elmah.MemoryErrorLog
Approval Tests or simply Approvals in a framework created by Llewellyn Falco and Dan Gilkerson,
providing support for .NET, Java, PHP and Ruby. It is not yet another
unit testing framework like NUnit or MbUnit etc., instead those
frameworks are used to...
In this post I am going to explain URL rewriting in greater details.
This post will contain basic of URL rewriting and will explain how we
can do URL rewriting in fewer lines of code.
Why we need URL rewriting?
Let’s consider a simpler scenario we...
As you may or may not have heard, yesterday WCF Web API preview 6 has been released. If you never heard about it I recommend you read the quick introduction
on CodePlex, but basically it is a facility that helps you expose your
services over the web,...
This is in a response to a question on twitter: In general, for applications, I would always use NHibernate. Mostly because I am able to do so much more with it. For
one off utilities and such, where I just need to get the data and I
don’t really care...
Have you ever seen code that look like this:
public string GetStatusDescription(Model model)
if(model.SystemState.WorkingMode == WorkingMode.NotManaged)
I was working on a Flickr application for Windows Phone 7 and one of
the required elements for it was the necessity to generate a signature,
that basically is a MD5 hash of a string. Instead of working directly
with hashing inside the application, I...
.NET Framework 4.0 introduced new class called Lazy<T> and I wrote blog post about it: .Net Framework 4.0: Using System.Lazy<T>.
One thing is annoying for me – we have to keep lazy loaded value and
its value loader as separate things. In...
something that I actually run into a lot at customer sites. They have a
lot of friction during development between different connection strings
that developers use during development. For example, we may have one
developer using: <add...
In our C++ Debugging course,
there are several scenarios which require WinDbg and cannot be
completed in Visual Studio. They all rely on advanced extension commands
available in WinDbg. Some examples: Tracing opened and closed handles with the !htrace...
For one of my projects, I need to use a WCF service to perform some
data manipulations. It is targeting .NET Framework 3.5. It is all good
when I try to test the service locally – either in the context of the
ASP.NET development server or in the...
Some of our business classes are used to fill dropdown boxes or
select lists. And often you have some base class for all your business
classes. In this posting I will show you how to use base business class
to write extension method that converts...
injection is a very simple concept: if you have an object that
interacts with other objects the responsibility of finding a reference
to those objects at run time is moved outside of the object itself.
What does it mean for an object to...
One of the requirements in a project that I work on lately is to
create on the fly video elements and to show them inside a canvas
element. This post will show you how you can do it. Adding Video Element on the Fly The
HTML5 Video element is a DOM...
Time is a very limited and expensive resource. As a software
developer I feel more often than not that I just don’t have enough of
it…That’s why whenever I find a new library or tool that save me
time I embrace it with both hands, especially if...
For some quite long time I naively thought that it is not possible
(or at least very difficult) to make ASP.NET MVC stuff work on a Web
Site project. But, my latest hacking of MVC
opened another perspectives. There are no any difficulties with ASP.NET
Multi-Targeting Pack for Microsoft .NET Framework 4.0.2 (KB2544526) This
update adds support for designing and developing applications for the
Update 4.0.2 for Microsoft .NET Framework 4 by using Microsoft Visual
Studio 2010 SP1 or later. The MT...
Here is a little feedback on Visual Studio 11 & Blend 5...
1 - Visual Studio 11
Visual Studio 11 is provided in the Windows 8 Developer Version. It is provided with some "Metro Application Style" templates. One first thing we can notice is that VS11 is...
.NET 4.5 has a little hidden gem up its sleeve – the ExceptionDispatchInfo class.
It’s used by the Task Parallel Library to capture and rethrow
exceptions when they are not aggregated – specifically, to support the
await keyword. Luckily, the...
As most of you know that Microsoft released the Visual Studio 11 Developers preview in BUILD Conference.
In this article we are going to see the list of new features provided
in Solution Explorer of Visual Studio IDE. Microsoft takes in to