Archive for the 'ASP.NET' Category

Tabcontrols and Multiple Gridviews

Thursday, April 23rd, 2009

If you have a TabContainer with multiple Tabs, and more than 1 tab have a gridview, any postback actions on the gridview will cause your tabcontainer to jump back to the first tab if you are not did not enclose the TabContainer in an update panel.
Digging into the source code reveals that the ClientStateField property [...]

Performance of Generics SortedDictionary and Dictionary

Thursday, April 16th, 2009

Based on a Vladimir Bodurov blog post on IDictionary options – performance test – SortedList vs. SortedDictionary vs. Dictionary vs. Hashtable, it seems to indicate that SortedDictionary is slower during inserts as compared to Dictionary but faster during searching.
However during the course of my development in ASP.NET 3.5, there have been several occasions which seems [...]

HttpRunTime Cache vs Enterprise Library Cache

Saturday, March 28th, 2009

This post aims to highlight the differences between the cache implementation of HttpRunTime and EnterpriseLibrary

HttpRuntime.Cache
Enterprise Library Caching Block

Standard Actions

Add Item to Cache

Read Item from Cache

Update Item to Cache
(using insert)
(using add)

Delete Item from Cache

Flush all Items in Cache

Enumeration Actions

Enumerate all items in cache

Employ LINQ Expressions

Cache Dependencies

Cache Dependency – File

Cache Dependency – Other Cache Item

[...]

ASP.NET and Web Gardens

Thursday, March 26th, 2009

When you are running your ASP.NET applications inside an application pool with only 1 worker process, everything works as expected. But things usually do not go so smoothly when you run the same application inside a web garden.
What is a web garden
Simply put, a web garden is a single web server running multiple IIS processes. [...]

Updating Active Directory using ASP.NET 3.5

Wednesday, March 25th, 2009

It is extremely easy to use ASP.NET to manage your Active Directory Users. This article shall list some of the common scenarios which is most frequently used.
Points to ensure

add the reference to System.DirectoryServices
The account running the website must have the appropriate access to the AD

Get Users in Group
List<UserID_CN>
result = new
List<UserID_CN>();

using (var
de = getEntry())
{
object
obj = [...]