Archive for December 2010

Regular Expression Web/Desktop tool for newbies!

December 31, 2010

An intuitive tool for learning, writing, and testing Regular Expressions.  Helped me great in learning RegExp! 🙂

Web version:

Key features include:
* real time results: shows results as you type

* code hinting: roll over your expression to see info on specific elements

* detailed results: roll over a match to see details & view group info below

* built in regex guide: double click entries to insert them into your expression

* online & desktop: or download the desktop version for Mac, Windows, or Linux

* save your expressions: My Saved expressions are saved locally

* search Community expressions and add your own

Desktop version:

Online JSON and YAML Parser

December 31, 2010

Fantastic online tools, you can try and learn. Dirt your hands right away! 🙂

1. Online JSON Parser

Allows you to paste in a JSON string and have it validated. It will immediately allow you to see pesky subtle errors in your JSON syntax. Just edit your JSON string right there in the box and it will auto update the preview below live so you can immediately see the effects your changes have on the outcome.

2. Online YAML Parser

YAML: YAML Ain’t Markup Language (
What It Is: YAML is a human friendly data serialization  standard for all programming languages (YAML to JSON/Python/Canonical YAML)

Hope you would enjoy great! 🙂

Javascript: Unobtrusive, Closure and “this” keyword

December 30, 2010

I found the below urls in understanding better about Unobtrusive, Closure and “this” keyword. Hope it would help you too! 🙂 Enjoy reading…!

What is an Unobtrusive?

What is Closure?

Scope of “this” keyword:

Useful VS.NET extensions & other tools

December 15, 2010

Below are some extensions & tools i use in my development. Hope this would help great!

VS.NET Extensions:

  • StyleCopFixer – Fixes (not 100%) some of SyleCop’s suggestions as Re-Sharper does
  • Vingy – Searches content for the selected word in net from the popular websites
  • PrettyJs – formatting Js
  • JavaScript parser – VS.NETs navigate to View=>Other windows=>JavaScript parser
  • Spellchecker
  • ADO.NET C# POCO Entity Generator
  • Productivity Power Tool
  • Entity Visualizer


  • AnkhSVN – Version control tool can integrated with VS.NET
  • – SQL profiler
  • SQL Enlight – Both in SSMS and VS.NET (Shareware)

ASP.NET Custom Validator Client side & Server Side validation not firing!

December 14, 2010

Your CustomValidator will only fire when the TextBox isn’t empty.

If the input control is empty, no validation functions are called and validation succeeds. Use a RequiredFieldValidator control to require the user to enter data in the input control.

A thread from Stackoverflow:

Telerik RadGrid Export to excel cell/column formating

December 10, 2010

In one of my development with Telerik RadGrid, i experienced the following 2 issues:

1). The file you are trying to open, ‘Filename.xls’, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening this file. Do you want to open the file now?

2). Format (Number)  column values/ styling cell or row

Find below the Url from Telerik, you can get some more number of tips over there:

Announcing Silverlight 5

December 5, 2010

Check it out ScottGu’s blog!

Some interesting questions and thoughts about Future of Silverlight 5 and HTML 5 – what now?

Here you go….

SQL Enlight – Analyze and validate T-SQL

December 4, 2010

SQL Enlight is a tool for SQL Server that can automate and facilitate the T-SQL code and database schema analysis. The tool works in a way similar to the .NET focused tools like FxCop and StyleCop. It provides design-time code, database schema and query plan analysis

Just check out the below Url

ASP.NET MVC – Exception Handling – Un Handled exception

December 4, 2010

In one of our new development, client team decided to start with ASP.NET MVC. As I knew only the plain MVC, I started exploring ASP.NET MVC little better. Over there, I tend to check about exception handling.  And found great about the in-built error handling using attribute [HandleError] at Class (Controller) level or Methods (Action) level.

1). In-Built way:

  1. MVC’s In-built attribute [HandleError] at Class(Controller) level or Methodd (Action) level
  2. We need <customErrors mode=”On” /> in web.config, so that by default, webserver will take us to view “/Shared/Eorror.aspx”
  3. Easily configurable
  4. No need of try…catch
  5. No logging is here

One quick reference:

2). With Logging:

  1. We can create a custom attribute like [LogError] by inheriting and implementing ActionFilterAttribute, IActionFilter respectively
  2. We can decorate with both the attributes [HandleError] and [LogError]
  3. Can be logged in any of the stores like TXT/Xml/SQLServer or etc. We have to have our own classes to do this

One quick reference:

In the continuation, I came across one open source project called ELMAH. It’s really awesome!

3). Open Source – ELMAH (Error Logging Modules and Handlers) way:

  1. Provides the capability logging in several available persistence stores like SQLServer, Xml , Memory and etc
  2. Provides a page handler (Ex: elmah.axd)  to view the all errors in HTML form
  3. No need to add any attributes to Controller or Method.  Having a ControllerFactory, we can inject them through Application_Start() from Global.asax.cs
  4. No [HandleError] attribute, ELMAH takes care

The things need to do are:

  • Need to add ELMAH.DLL
  • Add some configuration stuffs in Web.config
  • One dummy ActionResult to redirect to Error page, which can be configured in

Urls for quick reference:

  2. – Download the sample here

Here are the benefits I see are:

  1. No need of try…catch block, throwing and re-throwing
  2. Provides different stores
  3. Page to view all the errors (Report) and export into different form
  4. Notification by email can be configured and too many