Skip() in Linq avoids or skips the given number of elements from the sequence.
Skip() example in Linq
protected void Page_Load(object sender, EventArgs e)
{
var numArr = new int[5];
numArr[0] = 9;
numArr[1] = 6;
numArr[2] = 3;
numArr[3] = 5;
numArr[4] = 2;
...
Take() in Linq C#
In Linq i.e. System.Linq, Take operator is used to get the first specified number of elements a sequence.
Linq Take() example
using System.Linq;
protected void Page_Load(object sender, EventArgs e)
{
var numArray = new int[5];
numArray[0]...
AsEnumerable() in Linq
AsEnumerable() method in Linq is used to cast or convert given type into it's IEnumerable type. AsEnumerable() basically changes the compile time type of given type that implements IEnumerable to IEnumerable itself.
Sample code to use AsEnumerable() in Linq
protected void Page_Load(object sender, EventArgs e)
{
var numArray = new int[5];
...
Convert ToList() in Linq
In C# Linq, there is .ToList() extension method that is used to convert IEnumerable to List of type. Like .ToArray(), ToList() also forces immediate query execution and stores query result in List.
Example that shows how to convert array to list
protected void Page_Load(object sender, EventArgs e)
{
string[] language = { "C#", "C++", "Java",...
Convert ToArray in linq
In C# while using Linq, we have .ToArray() extension method that is used to convert IEnumerable to an array. .ToArray() forces immediate query execution and stores query result in an array.
Example of Linq .ToArray()
public partial class LinqToArray : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
...
ASP.NET CompareValidator
By
Avinash

In this post we will see how to use compare validator to compare the two input values. Using compare validator we can compare two values from two different input controls or we can compare input value with some constant or fixed value.
Example of compare validator
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
...
RangeValidator to validate data in between | asp.net
From the set of validation server controlin asp.net we will see how to use RangeValidator in this post.
RangeValidator is used to check if values entered are in between specific range or not. In order to use RangeValidator, we need to add server control on web form.
RangeValidator example:
<html xmlns="http://www.w3.org/1999/xhtml">
<head...
jQuery auto focus.
By
Avinash

In this post we will see how to set focus automatically on input control. This is done using .focus() function in jQuery.
jQuery auto focus example
<script type="text/javascript">
$(function () {
$("#fName").focus();
});
</script>
.focus()function is simple and we can call it...
Using RequiredFieldValidator to validate controls | asp.net
In ASP.NET there exists a set of validation server control which are useful to validate the data on form. In this post we will see how to use RequiredFieldValidator.
RequiredFieldValidator is used to check if field on the form is not empty. In order to use RequiredFiledValidator, we need to add server control on web form. After adding control on...
Detect IE browser | jQuery
In previous post we saw how to get IE browser in JavaScript
In this post we wiil see how to detect IE browser using jQuery. jQuery have Browser object like Navigator object in JavaScript. And using Browser object we can get Browser name, version..etc.
jQuery to get IE browser
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
...