Sharepoint 2010 Registering script files in a WebPart

Sharepoint 2010 provides a custom tag ScriptLink to register script files in a webpart. This can also be done using simple html script tag but using ScriptLink ensures all the sharepoint script namespaces are available for your custom script.

All the scripts that are to be registered should be placed in Layouts/ProjectName folder of your project. By default, when you create a project Layouts folder will not be added. Read more

Rendering Bing search with JSRender using API

JSRender is a jscript template engine very much similar to JQuery templates. It is replacing JQuery templates in the near future and still in beta. The main advantage of any template engine is to reduce the jscript code for rendering dhtml with some data. JSRender can be used with or without using JQuery. Read more

MVC3 Unobtrusive validation for checkbox

When using unobtrusive validation for checkboxes, it does not validate an unchecked checkbox which is marked as required. Its a known issue. By default, all the checkbox required conditions are ignored in unobtrusive validation.

A workaround for this issue is to add a custom attribute and some code change in the unobtrusive JavaScript library. Read more

Replacing Report Viewer date parameter default date picker with JQuery UI date picker

By default, Report Viewer control displays a default date picker for all the date parameters in parameter section. It creates a hidden iframe for each date picker and a calendar image(input type=’image’) is added next to each date input parameter which act as a trigger for the date picker.

Read more