Advertise here


Tag cloud


Posts Tagged ‘dot.net’

Set Start Index & Max Rows

Posted on Wednesday, October 5th, 2011 in Lambda Expressions

How to set a start index and max rows like in MySQL limit but using Lambda Expressions in c-sharp:

.skip() = start index

.take() = max rows

Example: If you had a list of twenty items and you only wanted to get the last five items.

var ItemList = Got.From.DataSource();
foreach(var Item in ItemList.Skip(15).Take(5)){
       //output result;
}

This saves you from querying your data source to get a set of results that might need to be displayed in different ways.


Use both Apache and IIS servers

Posted on Tuesday, July 12th, 2011 in Top Tips

In some cases you might find yourself having to use Apache and IIS locally to test our your sites. Unfortunately you can’t have both running at the same time as they both use port 80.

When you install the development tools for .Net applications, IIS is installed as well by default. After this or when ever you start up your machine IIS will automatically turn on, which will prevent you from running Apache. Read more



Web Design Essex | Richard Kotze – Web Technology, Design and Development powered by WordPress | Entries (RSS)