Csharp Code Samples

Rohan’s Blog – C# .NET Programming
  • rss
  • Home
  • About
  • Search
  • Contact Me

Update Panels and JSON Alternatives

Rohan Warang | June 1, 2009

In most asp.net applications users experience post backs as a result of submit action by the client browsers. These post backs can be quite annoying when just a small part of the page needs to be refreshed. Update panels are designed to perform partial post back eliminating the need for doing a complete post back for updating a part of the page.

But are these post backs truly partial? In this article we try to find out if Update panels actually improve performance by doing partial post backs or do they end up degrading it.

Read the rest of this entry »

Comments
1 Comment »
Categories
Optimization
Tags
Ajax, JSON, PageMethods, UpdatePanel
Comments rss Comments rss
Trackback Trackback

Configuring WCF Throttling Behaviors

Rohan Warang | April 27, 2009

Most WCF services hosted in a live environment if not configured for handling heavy simultaneous requests give a Denial of Service Error, better known as DoS attacks. To prevent these from happening we have to configure the throttling behavior and some attributes of the ServiceHost.

Read the rest of this entry »

Comments
2 Comments »
Categories
Optimization
Tags
Behavior, Microsoft, Throttling, WCF
Comments rss Comments rss
Trackback Trackback

Efficient Server Side Paging Alternatives

Rohan Warang | April 20, 2009

Every one of us has used paging in our projects to display tabular data in DataGrids or GridViews or in the more recent and more flexible ListViews.

The problem we often face is when the data is less the paging works fine, but as the data starts to increase the page load times start increasing. The main reason for this is because we tend to bind the grids with entire data table and then use the built in functionality for paging.

This article describes how to effectively do server side paging by retrieving only a finite amount of data using the traditional stored procedure technique, but optimized for not being affected by volume of data, and an alternative method using the very famous linq framework.

Read the rest of this entry »

Comments
No Comments »
Categories
Optimization
Tags
Database, Linq, Linq to SQL, Paging, Stored Procedure
Comments rss Comments rss
Trackback Trackback

Linq Filters On Lists

Rohan Warang | March 18, 2009

Microsoft .net framework 3.5 introduced the Language Integrated Query (Linq) feature. Linq provides a set of query operators to filter, join and perform other such data related operations on various types datasources such as lists, dictionaries, datasets etc.

In this article we perform a simple filter operation on a collection of data stored in a list using the traditional foreach loop method and the linq method and compare the performance statistics.

Read the rest of this entry »

Comments
1 Comment »
Categories
Optimization
Tags
Filters, Linq, Microsoft
Comments rss Comments rss
Trackback Trackback

« Previous Entries

Subscribe

dZone

Categories

  • Optimization
  • Tutorials

Admin

  • Log in
Creative Commons License rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox