ASP.NET User Controls are pretty useful. They allow functional modules of code and markup to be encapsulated in such a way that reuse is convenient and easy, without sacrificing the power or integration of the ASP.NET model. As we move into an era of AJAX-driven websites, this modularity is still very important. Can the user controls that we all know and (mostly) love still help with this encapsulation, despite being engineered before...
Wednesday, December 24, 2008
Tuesday, December 23, 2008
December 23, 2008
Note that VS added a @Register directive right at the top of the page on drag drop of the user control on to your page. But in future if you want to move the location of your User controls you will be forced to change the Register directive in multiple places depending on how many pages you have used the User Control. This could be a pain. This can be easily solved by moving the registration of the user control to your Web.config file with the...
December 23, 2008
It’s been a few months since I started getting acquainted with the System.DateTimeOffset type and I can honestly say I don’t see any reason to use System.DateTime anymore. I’ve even gone as far as ask whether anyone knew when I would rather use DateTime over DateTimeOffset. The responses I got were along the lines of ‘backwards compatibility’ or ‘when you need an abstract time’. My recommendation is that if you haven’t yet looked at the type,...
Monday, December 22, 2008
December 22, 2008
Scenario A common requirement for enquiry queries on an OLTP database is to have search criteria which are very specific ('get me details for for OrderID = NNNN') and also the occasional reports which ask for all the orders ('get me all the orders, no questions asked'.) Here is a sample from AdventureWorks which illustrates the problem: CREATE PROCEDURE RptOrder(@OrderID int) AS BEGIN SELECT * FROM Sales.SalesOrderHeader...
Friday, December 19, 2008
December 19, 2008
Today, I am starting my journey in MSDN blog . I hope, this will help people who are facing this problem. As a support engineer I have been troubleshooting many issues on daily basis. I am going to address an issue which is very common these days as people are migrating from 32 bit machine to 64 bit machines, They are facing some compatibility issues with the application build on 32 bit platform. I am gonna talk about one of such common problem...
Tuesday, December 16, 2008
December 16, 2008
Caching is an excellent way to improve the performance of a web application, and ASP.NET offers a rich caching API. Caching data typically involves the Cache object, which serves as an in-memory cache available to all requests to a web application. For example, when a visitor reaches the Top Selling Products page you can store the results retrieved from the database in the Cache object. When the next visitor reaches this page the list of top products...
Friday, December 12, 2008
December 12, 2008
There have been quite a few posts lately where people list the tools that make them productive throughout a given day, so I thought I would share some of the tools that I use on a daily basis. Rockscroll - Extends the scrollbar in Visual Studio to show a syntax highlighted thumbnail view of your source. Search .NET - Great .NET search engine C# Search .NET - Great search engine for all things C#. Console - A Windows console window enhancement....
December 12, 2008

I’ve noticed that the developer and designer community appear to be obsessed with lists. Is this for a reason that I have somehow missed? For example, over at dZone, 2 out of the top 3 most popular articles are lists: 15 CSS Tricks That Must be Learned and 10 Dirty Little Web Development Tricks - incidentally I liked both articles so I seem to have...
December 12, 2008
I love the asp.net validation controls. They're chick and really useful. We sometimes have to show some messages that are not the ErrorMessages of validators. An approach to do this could be to a) ScriptManager.RegisterClientScriptBlock to show a popup (YUCK!!) b) Put in a label and set its Text from code. This could be an option, only the error message will be in the label and not inside the ValidationSummary. This does not look good as some...
Monday, December 8, 2008
December 08, 2008
When building web applications, we've had a "defect" reported a number of times where a user presses a button twice in quick succession and causes a postback twice, typically causing whatever server-side code you've written to run twice. Fellow developers usually dismiss this "defect" and say "can't the user just press the button once and wait?". Short answer, NO. I've solved this in the past a few different ways. For long running tasks I use...
Friday, December 5, 2008
December 05, 2008
Alachisoft has released TierDeveloper 6.1 as free software (previous version priced at $1495/developer). TierDeveloper lets you develop major chunks of your .NET applications in a matter of hours and days instead of weeks and months. TierDeveloper is one of the most feature-rich ORM code generators in the market. It provides you the following: - Map and generate .NET persistence and domain objects in C# and VB.NET - Design and generate...