Pages

How to disable webclient caching in windows phone

Few months back, I was working with Silverlight for Windows Phone. Application makes an API call to get a list of items which were randomized on every new call to an API service. There was nothing to be done in this as the randomization logic of items was being handled by the server code.

Single Responsibility Principle (SRP)


Single Responsibility Principle or simply SRP is the simplest among 5 principles, SOLID, of object oriented programming. My intent behind this post is to make it even simpler to understand for those who are just starting.

MSMQ over HTTP and Load Balancer - Part 2

In Part 1 we saw how to configure MSMQ to work with HTTP protocol. In this post we will send messages to remote queue and also check if our message did really reach the queue. Consider there are two servers, one where application resides and other where queue resides. We will call them Server1 and Server 2. To be specific, this post talks about remote non-transactional private queues.

MSMQ over HTTP and Load Balancer - Part 1

MSMQ 3.0 introduced many new features like Internet Messaging (referencing queues via HTTP, SOAP-formatted messages, MSMQ support for Internet Information Services), queue aliases, multi casting of messages, and additional support for programmatic maintenance and administration of queues and MSMQ itself (source Wikipedia).

How to group radio buttons in gridview

Here I am going to show how to make radio buttons work when they are in gridview column. Radio button's GroupName property does not work because of the way asp.net sets name property of the child controls of a data bound control. I will show how to select exactly one radio button from a gridview column. I will keep it very simple and short.

Draw hierarchical tree in html using organizational chart control

Few years back, I created multilevel marketing web application and one of the obvious requirements was to display customer network that included its sponsor as well as the customers who were sponsored by that customer. In other words, this was nothing but to display hierarchical data in a tree format on a web page.

Load partial data in Gridview using JQuery Ajax

Data controls in asp.net, by default, display all the data that you provide them. However some (in fact many) time, you may want to display only first few records initially and remaining on subsequent user interactions. There are number of ways to achieve this. For example, enabling pagination support on the control (if it supports), implementing server side pagination in your stored procedures or writing custom logic in application code to fetch only required sets of data etc.

Select rows using header checkbox in gridview

Here I am going to show a simple jQuery code that selects all the checkboxes from grid rows when header checkbox is selected. This is pretty common requirement. Also the code toggles header checkbox depending on whether all the rows have been selected.

Auto complete textbox using jQuery

Here I am going to show simplest way to write auto-completer using jQuery ajax. Code has sufficient comments and hence is self explanatory. So I will not explain it any further, simply follow the steps as shown below.

Get QueryString values using JavaScript

In asp.net, we retrieve query string values using QueryString collection property of HttpRequest class which in turn is exposed as a Request property of Page class. So in asp.net we can get query string value using syntax like Page.Request.QueryString[index | "key_name"] and so on. However, many times, we also need to access these query string values in client script, say, JavaScript.