Monday, August 22, 2011

Paging in LINQ

public static IEnumerable<TSource> Page<TSource>(this IEnumerable<TSource> source, int page, int pageSize)
          return source.Skip((page - 1)*pageSize).Take(pageSize);

Html 5 Controls for ASP.Net MVC

What is SVG?

SVG stands for Scalable Vector Graphics and it is a language for describing 2D-graphics and graphical applications in XML and the XML is then rendered by an SVG viewer.

HTML5 allows embeding SVG directly using <svg>...</svg> tag.
<!DOCTYPE html>
<meta charset="utf-8" />
<h2>HTML5 SVG Circle</h2>
<svg id="svgelem" height="200" xmlns="">
    <circle id="redcircle" cx="50" cy="50" r="50" fill="red" />